Pulse Output Example Program
Pulse Output Example Program
From mounter
z Operation Pattern
An origin search is performed.
Fixed-distance positioning is repeated.
The system is returned to the original position.
Origin search
CCW Fixed-distance CW
positioning repeated
50,000 Hz
(C350 Hex)
10,000
(2710 Hex)
CCW CW
Acceleration/deceleration:
Return to start 1,000 Hz/4 ms (03E8 hex)
SmartStep A-series
Servo Drive
R88A-CPU00S
and resistor 12
4 -SIGN
1.6kΩ 5 +ECRST
Error counter reset output 0 (CIO 100.04) 6 -ECRST
V+ (NS(1)-type only)
V- (NS(1)-type only)
COM (CIO 100)
Move stocker (CIO 100.01)
PCB storage enabled (CIO 100.03) 8 INP
Input terminal block 33 ZCOM
Pulse 0 origin input signal (CIO 0.06) 32 Z
COM 13 +24VIN
24-VDC Servo Drive
RUN input X1
Pulse 0 origin proximity input signal (CIO 0.10) 14 RUN
18 RESET
Servo Drive alarm reset input
Origin search start switch (CIO 0.00) 10 OGND
Emergency stop switch (CIO 0.01) 35 ALMCOM
PCB storage completed (CIO 0.03) X1 34 ALM
Stocker movement completed (CIO 0.04) 24-VDC
XB 7 BKIR
Hood FG
Only NS(1)-type CPU Units can wire V+ and V-. Do not wire them in N-type CPU Units.
z Operation
1 An origin search is performed using the Origin Search Start Switch (CIO 0.00).
2 When the origin search is finished, the PCB Storage Enabled Output (CIO 100.03) is turned ON.
3 When a PCB has been stored, the stocker is raised (relative positioning) using the PCB Storage
Completed Input (CIO 0.03).
4 Storing PCBs is repeated until the stocker is full.
5 The number of PCBs in the stocker is counted with counter C0 by counting the number of times
the stocker is raised.
6 When the stocker is full, it is moved (CIO 100.01) and only the conveyor is lowered (absolute
positioning) when stoker movement is completed (CIO 0.04).
7 An emergency stop is executed to stop pulse output with the Emergency Stop Switch Input (CIO 0.01).
Preparations
z PLC Setup
Setting
Use define origin operation for pulse output 0.
Note The Use define origin operation setting is read from the PLC Setup when the power supply is turned ON.
z DM Area Settings
• Settings for PLS2 for Fixed-distance Positioning (D0 to D7)
Setting details Address Data
Acceleration rate: 1,000 Hz/4 ms D0 #03E8
Deceleration rate: 1,000 Hz/4 ms D1 #03E8
Target frequency: 50,000 Hz D2 #C350
D3 #0000
Number of output pulses: 10,000 pulses D4 #2710
D5 #0000
Starting frequency: 0 Hz D6 #0000
D7 #0000
• Settings for PLS2 to Return to Start (D10 to D17)
Setting details Address Data
Acceleration rate: 300 Hz/4 ms D10 #012C
Deceleration rate: 200 Hz/4 ms D11 #00C8
Target frequency: 50,000 Hz D12 #C350
D13 #0000
Number of output pulses: 0 pulse D14 #0000
D15 #0000
Starting frequency: 100 Hz D16 #0064
D17 #0000
• Number of Repeats of Fixed-distance Positioning Operation (D20)
Setting details Address Data
Number of repeats of fixed-distance positioning D20 #000F
operation (number of PCBs in stocker)
Ladder Program
Positioning
Lift 10,000 pulses (relative) at a time
W0.02 W0.04 W0.03
Lift positioning in progress
Lift positioning Lift positioning
start completed
@PLS2
W0.03
#0000
Lift positioning #0100
in progress D0
D6
A280.03 W0.04
Lift positioning completed
Pulse Output Completed Flag
Counter for number of lifts (number of PCBs stored)
W0.04
CNTX
Lift positioning completed 0000
W0.09 D20
Lower positioning
completed
P_First_Cycle
Positioning
Lower to "0" position (absolute pulses)
W0.08
W0.07 W0.09
Lower positioning in progress
Lower positioning Lower positioning
start completed @PLS2
W0.08
#0000
Lower positioning #0101
in progress D10
D16
A280.03 W0.09
Lower positioning completed
Pulse Output Completed Flag
A540.08
0.05
CW Limit Input Signal Flag
Built-in input
0.07 A540.09
CCW Limit Input Signal Flag
Built-in input
12
Marker sensor Speed
Position
control
Pulse output
z Operation Pattern
Speed control is used to feed wrapping material to the initial position. When the marker sensor input
is received, fixed-distance positioning is performed before stopping.
10,000 Hz
500 Hz/4ms (2710 Hex)
(01F4 Hex)
Position control
Speed control 5,000 (1388 hex)
pulses output before stopping.
PLS2 is executed in
input interrupt task.
z Operation
1 Speed control is used to feed wrapping material to the initial position when the Start Switch (CIO
0.00) is activated.
2 When the Marker Sensor Input (CIO 0.04) is received, the PLS2 instruction is executed in inter-
rupt task 4.
4 An emergency stop is executed to stop pulse output with the Emergency Stop Switch input (CIO
0.01).
Preparations
z PLC Setup
Setting
Enable using built-in input IN4 as an interrupt input.
Note The interrupt input setting is read from the PLC Setup when the power supply is turned ON.
z DM Area Settings
• Speed Control Settings to Feed Wrapping Material to Initial Position
Setting Address Data
Acceleration/deceleration rate: D0 #01F4
500 Hz/4 ms
Target frequency: 10,000 Hz D1 #2710
D2 #0000
Ladder Program
12
Feeding Material with Speed Control
A280.03 W0.01
Material positioning completed
Pulse Output
Completed Flag
Emergency Stop
0.01
@INI
Emergency stop switch #0000
#0003
0
When operating with the absolute pulse specification, the movement direction (CW/CCW) is selected
automatically based on the relationship between the pulse output PV when the instruction is executed
and the specified target position. The direction (CW/CCW) specified in an ACC, SPED or PLS2 instruc-
tion is not effective.
Using CW/CCW Limit Inputs for Pulse Output Functions other than
Origin Searches
Pulse outputs will stop according to the PLC Setup when either the CW or CCW Limit Input Signals
turns ON. It is also possible to select whether or not the defined origin will be cleared when a CW or
CCW Limit Input Signal turns ON for a pulse output function.
z Equations
The INT function extracts an integer from the fraction. The non-integer remainder is rounded.