6 - 138
6 POSITIONING CONTROL
(5) Motion SFC program
Motion SFC program for which executes the servo program is shown below.
SET M2042
CPSTART2
Axis 1
Axis 2
Speed 10000pulse/s
ABS-2
Axis 1, 20000pulse
Axis 2, 10000pulse
ABS
Axis 1, 30000pulse
Axis 2, 20000pulse
Center 1, 30000pulse
Center 2, 10000pulse
ABS-2
Axis 1, 40000pulse
Axis 2, 25000pulse
Speed 15000pulse/s
ABS-2
Axis 1, 50000pulse
Axis 2, 40000pulse
CPEND
PX000*M2415*M2435
END
Set P1
Speed-switching during instruction execution
!PX000
SET M2040=PX010
RST M2040=!PX010
Speed change
Speed-switching during
instruction execution
Turn on all axes servo ON command.
Wait until PX000, Axis 1 servo ready and Axis 2 servo
ready turn on.
Set P4
Set P2
Set P3
Wait until PX000 turn off after constant-speed control
completion.
[F10]
[G10]
[K310]
[G20]
[F20]
Speed-switching point specified flag turn on when
PX010 turn on.
Speed-switching point specified flag turn off when
PX010 turn off.
(Note): Example of the above Motion SFC program is started using the automatic start or sequence program.