Mitsubishi Electronics Q173HCPU/Q172HCPU Work Light User Manual


 
7 - 67
7 AUXILIARY AND APPLIED FUNCTIONS
[Program Example]
Program executes manual pulse generator operation is shown as the following
conditions.
(1) System configuration
Manual pulse generator operation of Axis 1.
Manual pulse generator enable flag
(M2051 : P1, M2052 : P2)
MM
MM
Motion CPU control module
Axis
4
Axis
1
Axis
2
Axis
3
Manual pulse generator P2
Manual pulse generator P1
AMP AMP AMP AMP
Q61P Q02H
CPU
Q172H
CPU
Q172
LX
QX41
(2) Manual pulse generator operation conditions
(a) Manual pulse generator operation axis........... Axis 1, Axis 2
(b) Manual pulse generator 1-pluse input magnification............ 100
(c) Manual pulse generator operation enable ...... M2051(Axis 1)/M2052(Axis 2)
ON
(d) Manual pulse generator operation end ……… M2051(Axis 1)/M2052(Axis 2)
OFF
(3) Motion program (Control program)
O0100
SET #M2042; All axes servo ON command turns on.
N10 IF [[ON #M2415] AND [ON #M2435]] GOTO 20; Wait until axis 1 and axis 2 servo ON.
GOTO 10;
N20 IF [ON #X000] GOTO 30; Wait until manual pulse generator operation start.
GOTO 20;
N30 #D720 = 100;
#D721 = 100;
#D714L = 1; Control axis 1 by P1.
#D716L = 2; Control axis 2 by P2.
SET #M2051;
SET #M2052;
N40 IF [OFF #X000] GOTO 50; Wait until manual pulse generator operation end.
GOTO 40;
N50 RST #M2051;
RST #M2052;
M02;
%
(Note) : Control program O0100 is started by automatically start, CALL, GOSUB,
GOSUBE or SFCS instruction of the PLC program.
Axis 1 and axis 2 manual pulse generator enable flag turn off.
(Note) : Turn off the P1 and P2 manual pulse generator enable flag for
safety not to continue the manual pulse generator operation at
the manual pulse generator operation end.
Axis 1 and axis 2 manual pulse generator enable flag turn on.
Set "axis 1" and "axis 2" 1-pluse input magnification.