A
A-4 CP1L Programming Examples
SYSMAC CP1L Getting Started Guide
135
Ap
pend
ix
Programming Example 1
Use comparison instructions to compare counter values.
The program can be created easily by using comparison instructions to compare
counter values.
z
Ladder Program
DIFU
A531.00
#0DAC
>=(325)
A270
#0BB8
>=(325)
A270
#0DDE
>=(325)
A270
#0DAC
>=(325)
A270
#0DDE
<(310)
A270
100.00
Motor run
W0.00
0.02
Start motor
100.00
Motor run
Stop motor
100.01
Motor slow
W0.00
Stop motor
Software reset
for high-speed counter 0
0.02
W0.00
Stop motor
W0.01
Motor stopped
Start motor
100.02
Normal stop
position
100.03
Error stop
position
W0.01
Motor stopped
Counter values are used to start/slow/stop the motor.
After motor stops, check the stop position.
When high-speed
counter (A270) reaches
3000 (0BB8 Hex),
the motor decelerates.
When high-speed
counter (A270) reaches
3500 (0DAC Hex),
the motor is stopped.
Stop position is in error if
the high-speed counter (A270)
is greater than 3550
(0DDE Hex).
Stop position is normal if the
high-speed counter (A270) is
between 3500 (0DAC Hex)
and 3550 (0DDE Hex).
W07E-EN-02+CP1L+GettingStartedGuide.book Seite 135 Montag, 15. September 2008 11:15 11