Mitsubishi Electronics Q173CPU(N) Home Security System User Manual


 
APP - 13
A
PPENDICES
APPENDIX 2.3 Motion control example by Motion SFC program
(1) The Motion SFC program composition example to execute motion
control.
This sample program example is described to every following function.
Function list of sample program
No. Item Description
1
Monitor of the positioning
dedicated device
The positioning dedicated device status of the Motion CPU (CPU No.2)
is reflected on "M2400 to" and "D0 to" of the PLC CPU (CPU No.1).
2 Reading of the clock data
The clock data read request (M9028) is turned on so that clock data
may be set to the error history.
3 Forced stop
When the forced stop input assigned to PX0 is on, all axes turn on, and
motion control is executed.
When the forced stop input turn off, servo amplifier is made to forced
stop, and motion control is suspended, and actual output (PY) turn off.
4 Motion control
Motion control is executed according to the condition of PX and PX2 in
each following mode.
• PX2 : OFF PX1 : OFF JOG mode
• PX2 : OFF PX1 : ON Manual pulse generator mode
• PX2 : On PX1 : OFF Home position return mode
• PX2 : On PX1 : On Programming operation mode
5 JOG mode
The following JOG operation is executed when each signal of PX3 to
PX6 is turned on.
• PX3 : 1 axis JOG forward rotation
• PX4 : 1 axis JOG reverse rotation
• PX5 : 2 axes JOG forward rotation
• PX6 : 2 axes JOG reverse rotation
6 Manual pulse generator mode
The following the manual pulse generator operation is executed.
• Manual pulse generator operation of 1 axis is executed with the
manual pulse generator P1.
• Manual pulse generator operation of 2 axes is executed with the
manual pulse generator P1.
7 Home position return mode
The following home position return is executed.
• When PX3 is on, the home position return of 1 axis is executed.
• When PX4 is on, the home position return of 2 axes is executed.
8 Programming operation mode
The following program operation is executed.
• When PX3 detects OFF to ON, axis No.1 locates and 1000[ms]
standing by, after the location of axis No.2 is executed.
• When PX4 turn on, axis No.1, 2 locates of the linear control and in-
position check is executed, after the location of axis No.2 is
executed, the program stands by until No.1, 2 locates of the linear
control is executed at a double speed in the opposition direction and
PX4 turns off.