0% found this document useful (0 votes)
74 views

Pulse Output Example Program

This document describes using pulse outputs to vertically convey PCBs using multiple progressive positioning. 1) It discusses wiring a CP1E CPU unit to control a SmartStep A-series servo drive to raise and lower a stocker conveyor using pulse outputs, origin signals, and I/O to track positioning. 2) The operation involves performing an origin search, then repeatedly raising the stocker a fixed distance using relative positioning until it is full, at which point the entire conveyor lowers using absolute positioning. 3) Preparations include setting the PLC for define origin operation on pulse output 0 and programming acceleration, deceleration, target frequency, number of pulses, and starting frequency in the DM

Uploaded by

Yuli Rahmawati
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
74 views

Pulse Output Example Program

This document describes using pulse outputs to vertically convey PCBs using multiple progressive positioning. 1) It discusses wiring a CP1E CPU unit to control a SmartStep A-series servo drive to raise and lower a stocker conveyor using pulse outputs, origin signals, and I/O to track positioning. 2) The operation involves performing an origin search, then repeatedly raising the stocker a fixed distance using relative positioning until it is full, at which point the entire conveyor lowers using absolute positioning. 3) Preparations include setting the PLC for define origin operation on pulse output 0 and programming acceleration, deceleration, target frequency, number of pulses, and starting frequency in the DM

Uploaded by

Yuli Rahmawati
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

12 Pulse Outputs

12-7 Application Examples

12-7-1 Vertically Conveying PCBs (Multiple Progressive Positioning)

Specifications and Operation


z Outline
PCBs with components mounted are stored in a stocker.
When a stocker becomes full, it is moved to the conveyance point.

Positioning Operation for Vertical Conveyor


Stocker conveyance
position

 
From mounter

z Operation Pattern
An origin search is performed.
Fixed-distance positioning is repeated.
The system is returned to the original position.

CCW Origin (servo Origin CW


limit phase Z) proximity limit

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)

PCB storage PCB storage Stocker Stocker movement


enabled completed moved completed

12-36 CP1E CPU Unit Software User’s Manual(W480)


12 Pulse Outputs

z Wiring Example Using SmartStep A-series Servo Drive


Origin Search Start Switch (CIO 0.00)

12-7 Application Examples


Emergency Stop Switch (CIO 0.01)

Stocker Moved (CIO 100.01) PCB Storage Completed (CIO 0.03)


Stocker Movement Completed PCB Storage Enabled (CIO 100.03)
(CIO 0.04)

SmartStep A-series
Servo Drive

R88A-CPU00S
and resistor 12

12-7-1 Vertically Conveying PCBs (Multiple Progressive Positioning)


CP1E N/NA(S)-type CPU Unit (CP1E-N/NADT-) SmartStep A-series Servo Drive (R7D-AP)

Power supply terminal R88A-CPU00S


DC24V power supply (+)
DC24V power supply (-)
Output terminal block
1.6kΩ
Pulse output (CIO 100.00) 1 +PULS * Instruction pulse mode =
Pulse 1.6kΩ 2 -PULS feed pulse and
output 0 Direction output (CIO 100.02) 3 +SIGN forward/reverse signal

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 N††S(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).

CP1E CPU Unit Software User’s Manual(W480) 12-37


12 Pulse Outputs

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)

12-38 CP1E CPU Unit Software User’s Manual(W480)


12 Pulse Outputs

Ladder Program

12-7 Application Examples


Jog Operation

0.00 W0.01 W0.00


Origin search in progress
Origin search Origin search
start switch completed
@ORG
W0.00
#0000
#0100
Origin search
in progress A280.05 W0.01
Origin search completed
12
No-origin Flag

12-7-1 Vertically Conveying PCBs (Multiple Progressive Positioning)


100.03
W0.01 W0.02
PCB storage enabled
Origin search Lift positioning
completed start
W0.05 0.03 W0.02
Lift positioning start
PCB stored PCB storage completed
100.03

PCB storage enabled

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

First Cycle Flag

CP1E CPU Unit Software User’s Manual(W480) 12-39


12 Pulse Outputs

When the stocker is not full (C0 = OFF), store PCB,


and repeat lift positioning after PCB storage is completed.
W0.05
W0.04 C000
PCB stored
Lift positioning Stocker full
completed

When the stocker is full (C0 = ON), move the stocker,


and start lower positioning after stocker movement is completed.
W0.04 C000 W0.06
Stocker moved
Lift positioning Stocker full
completed
W0.06 W0.07 100.01
Stocker moving output
Stocker Lower
moved positioning
100.01 0.04 W0.07
Lower positioning
Stocker moving Stocker movement completed
output

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

Emergency stop (Pulse output stopped)


0.01
@INI
Emergency stop switch #0000
#0003
0
Repeat limit input settings
Limit inputs are allocated to external sensors using the following programming.

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-40 CP1E CPU Unit Software User’s Manual(W480)


12 Pulse Outputs

12-7-2 Feeding Wrapping Material: Interrupt Feeding

12-7 Application Examples


Specifications and Operation

z Feeding Wrapping Material in a Vertical Pillow Wrapper

Start switch (CIO 0.00)

Emergency stop switch (CIO 0.01)

12
Marker sensor Speed

12-7-2 Feeding Wrapping Material: Interrupt Feeding


(input 0.04) control

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.

Marker sensor input


(0.04)

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.

3 Fixed-distance positioning is executed with the PLS2 instruction before stopping.

4 An emergency stop is executed to stop pulse output with the Emergency Stop Switch input (CIO
0.01).

CP1E CPU Unit Software User’s Manual(W480) 12-41


12 Pulse Outputs

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

• Positioning Control Settings for Wrapping Material


Setting Address Data
Acceleration rate: 500 Hz/4 ms D10 #01F4
Deceleration rate: 500 Hz/4 ms D11 #01F4
Target frequency: 10,000 Hz D12 #2710
D13 #0000
Number of output pulses: 5,000 D14 #1388
pulses D15 #0000
Starting frequency: 0 Hz D16 #0000
D17 #0000

12-42 CP1E CPU Unit Software User’s Manual(W480)


12 Pulse Outputs

Ladder Program

12-7 Application Examples


z Cyclic Task Program (Executed at Startup)

Enabling Input Interrupt 4 (IN4)


P_First Cycle
MSKS
First Cycle Flag 104
#0

12
Feeding Material with Speed Control

0.00 W0.01 W0.00


Material being fed
Material Material
feed start positioning
completed @ACC
W0.00
#0000
Material #0100
being fed D0

A280.03 W0.01
Material positioning completed
Pulse Output
Completed Flag

Emergency Stop
0.01
@INI
Emergency stop switch #0000
#0003
0

z Program for Interrupt Task 4


Interrupt Task for Marker Sensor Input IN4
Starting interrupt feed
P_ON
PLS2
Always ON Flag #0000
#0100
D10
D16

CP1E CPU Unit Software User’s Manual(W480) 12-43


12 Pulse Outputs

12-8 Precautions when Using Pulse Outputs

Movement Direction when Specifying Absolute Pulses

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.

Difference between Set Frequencies and Actual Frequencies


The CP1E CPU Unit’s pulse output frequency is determined by dividing the source clock frequency
(32 MHz) by an integer ratio. Consequently, there may be a slight difference between the set frequency
and the actual frequency, and that difference increases as the frequency increases. The actual fre-
quency can be calculated from the following equations.

z Pulse Output System


Integer dividing ratio calculated
from user’s set frequency

Output pulses (actual frequency)


Source clock Frequency divider
32MHz

z Equations

Source clock frequency


Actual frequency (Hz)=
Dividing ratio

Source clock frequency × 2 + Set frequency


Dividing ratio=INT
Set frequency (Hz) × 2

The INT function extracts an integer from the fraction. The non-integer remainder is rounded.

12-44 CP1E CPU Unit Software User’s Manual(W480)


12 Pulse Outputs

12-8 Precautions when Using Pulse Outputs


z Differences between Set Frequencies and Actual Frequencies
Source clock frequency: 32 MHz
Set frequency (kHz) Actual frequency (kHz)
99.844 to 100.000 100.000
99.534 to 99.843 99.688
: :
50.040 to 50.117 50.078
49.961 to 50.039 50.000
49.884 to 49.960 49.921
: :
10.002 to 10.004 10.003
9.999 to 10.001 10.000 12
9.996 to 9.998 9.996

Combinations of Pulse Control Instructions


The following tables show when a second pulse control instruction can be started if a pulse control
operation is already being executed.
A second independent-mode positioning instruction can be started if an independent-mode positioning
instruction is being executed, and a second continuous-mode speed control instruction can be started if
a continuous-mode speed control instruction is being executed. Operation cannot be switched between
the independent and continuous modes, although a PLS2 instruction can be executed while a ACC
instruction (continuous mode) is being executed.
It is possible to start another operation during acceleration/deceleration and start another positioning
instruction during positioning
z:Can be executed. ✕ :Error occurs.
Instruction being started

Instruction being executed SPED SPED ACC ACC


INI (Indepen- (Contin- (Inde- (Contin- PLS2 ORG
dent) uous) pendent) uous)
SPED (Independent) z z ✕ z ✕ ✕ ✕
(*1) (*3)
SPED (Continuous) z ✕ z ✕ z ✕ ✕
(*2) (*5)
ACC Steady speed z ✕ ✕ z ✕ z ✕
(Indepen- (*4) (*6)
dent) Accelerating or z ✕ ✕ z ✕ z ✕
decelerating (*4) (*6)
ACC Steady speed z ✕ ✕ ✕ z z ✕
(Continuous) (*5) (*7)
Accelerating or z ✕ ✕ ✕ z z ✕
decelerating (*5) (*7)
PLS2 Steady speed z ✕ ✕ z ✕ z ✕
(*4) (*8)
Accelerating or z ✕ ✕ z ✕ z ✕
decelerating (*4) (*8)
ORG Steady speed z ✕ ✕ ✕ ✕ ✕ ✕
Accelerating or z ✕ ✕ ✕ ✕ ✕ ✕
decelerating

*1 SPED (Independent) to SPED (Independent)


• The number of output pulses cannot be changed.
• The frequency can be changed.

CP1E CPU Unit Software User’s Manual(W480) 12-45


12 Pulse Outputs

*2 SPED (Continuous) to SPED (Continuous)


• The frequency can be changed.
*3 SPED (Independent) to ACC (Independent)
• The number of output pulses cannot be changed.
• The frequency can be changed.
• The acceleration/deceleration rate can be changed.
*4 ACC (Independent) to ACC (Independent) or PLS2 to ACC (Independent)
• The number of output pulses cannot be changed.
• The frequency can be changed.
• The acceleration/deceleration rate can be changed. (The rate can even be changed during acceleration or
deceleration.)
*5 SPED (Continuous) to ACC (Continuous) or ACC (Continuous) to ACC (Continuous)
• The frequency can be changed. (The target frequency can even be changed during acceleration or decel-
eration.)
• The acceleration/deceleration rate can be changed. (The rate can even be changed during acceleration or
deceleration.)
*6 ACC (Independent) to PLS2
• The number of output pulses can be changed. (The setting can even be changed during acceleration or
deceleration.)
• The frequency can be changed. (The target frequency can even be changed during acceleration or decel-
eration.)
• The acceleration/deceleration rate can be changed. (The rate can even be changed during acceleration or
deceleration.)
*7 ACC (Continuous) to PLS2
• The frequency can be changed. (The target frequency can even be changed during acceleration or decel-
eration.)
• The acceleration/deceleration rate can be changed. (The rate can even be changed during acceleration or
deceleration.)
*8 PLS2 to PLS2
• The number of output pulses can be changed. (The setting can even be changed during acceleration or
deceleration.)
• The frequency can be changed. (The target frequency can even be changed during acceleration or decel-
eration.)
• The acceleration/deceleration rate can be changed. (The rate can even be changed during acceleration or
deceleration.)

Origin Search Error Processing


The CP1E CPU Unit’s pulse output function performs a basic error check before starting to output
pulses (when the instruction is executed) and will not output pulses if the settings are incorrect.
There are other errors that can occur with the origin search function during pulse output, which may
stop the pulse output.
If an error occurs that stops pulse output, the pulse output’s Output Stopped Error Flag will be turned
ON and the Pulse Output Stop Error Code will be written to Error Code word. Use these flags and error
codes to identify the cause of the error.
The Pulse Output Stop Errors will not affect the CPU Unit’s operating status. (The Pulse Output Stop
Errors do not cause a fatal or non-fatal error in the CPU Unit.)

12-46 CP1E CPU Unit Software User’s Manual(W480)


12 Pulse Outputs

12-8 Precautions when Using Pulse Outputs


z Related Auxiliary Area Flags
Pulse Pulse
Function Settings
output 0 output 1
Output Stopped Error Flags 0: No error A280.07 A281.07
ON when an error occurred while outputting pulses in the 1: Stop error occurred.
origin search function.
Stop Error Codes A444 A445
When a Pulse Output Stop Error occurs, the error code is stored in that pulse outputs
corresponding Stop Error Code word.

z Pulse Output Stop Error Codes


Error Operation after
Error name
code
Likely cause Corrective action
error
12
CW Limit Stop 0100 Stopped due to a CW limit sig- Move in the CCW direction. Immediate stop
Input Signal nal input. No effect on other

12-7-2 Feeding Wrapping Material: Interrupt Feeding


CCW Limit 0101 Stopped due to a CCW limit sig- Move in the CW direction. port
Stop Input Sig- nal input.
nal
No Origin Prox- 0200 The parameters indicate that the Check the wiring of the Origin Proximity Input No effect on other
imity Input Sig- Origin Proximity Input Signal is Signal as well as the PLC Setup’s Origin port
nal being used, but a Origin Proxim- Proximity Input Signal Type setting (NC or
ity Input Signal was not received NO) and execute the origin search again.
during the origin search.
No Origin Input 0201 The Origin Input Signal was not Check the wiring of the Origin Input Signal as
Signal received during the origin well as the PLC Setup’s Origin Input Signal
search. Type setting (NC or NO) and execute the ori-
gin search again.
Origin Input 0202 During an origin search in oper- Take one or both of the following steps so Decelerates to a
Signal Error ating mode 0, the Origin Input that the Origin Input Signal is received after stop.
Signal was received during the deceleration is completed. No effect on other
deceleration started after the • Increase the distance between the Origin port
Origin Proximity Input Signal Proximity Input Signal sensor and Origin
was received. Input Signal sensor.
• Decrease the origin search high speed.
Limit Inputs in 0203 The origin search cannot be Check the wiring of the limit signals in both Operation will not
Both Directions performed because the limit sig- directions as well as the PLC Setup’s Limit start.
nals for both directions are Signal Type setting (NC or NO) and execute No effect on other
being input simultaneously. the origin search again. port
Simultaneous 0204 The Origin Proximity Input Sig- Check the wiring of the Origin Proximity Input Immediate stop
Origin Proximity nal and the Limit Input Signal in Signal and the Limit Input Signal. Also check No effect on other
and Limit Inputs the search direction are being the PLC Setup’s Origin Proximity Input Signal port
input simultaneously during an Type and Limit Signal Type settings (NC or
origin search. NO) and then execute the origin search
again.
Limit Input Sig- 0205 • When an origin search in one Check the wiring of the Limit Input Signal and Immediate stop
nal Already direction is being performed, the PLC Setup’s I/O settings. Also check the No effect on other
Being Input the Limit Input Signal is PLC Setup’s Limit Signal Type setting (NC or port
already being input in the ori- NO) and then execute the origin search
gin search direction. again.
• When a non-regional origin
search is being performed, the
Origin Input Signal and the
Limit Input Signal in the oppo-
site direction (from the search
direction) are being input
simultaneously.

CP1E CPU Unit Software User’s Manual(W480) 12-47

You might also like