Mitsubishi Electronics Q173HCPU/Q172HCPU Work Light User Manual


 
6 - 168
6 MOTION PROGRAMS FOR POSITIONING CONTROL
(4) The CLEAR at the program call as the following operation.
O100 ; (Control program)
A
%
GOSUB JXJY P200 ;
M02 ;
O200 ; (Axis designation program)
%
G01 X100. Y100. ;
M02 ;
O100 ; (Control program)
B
%
GOSUB P200 ;
M02 ;
O200 ; (Control program)
%
;
M02 ;
(a) When the started program is a control program, if the main program (O0100)
is cleared, the both of the main program (O0100) and subprogram (O0200)
end. (Figure B)
(b) When the started program is a control program, if the subprogram (O0200) is
cleared, the execution ends and the control returns to the main program
(O0100). (Figure B)
(c) When the started program is a designation program, if the main program
(O0100) is cleared, only main program (O0100) ends and the subprogram
(O200) does not end. (Figure A)
(d) When the started program is a designation program, if the subprogram ends
by the stop command or rapid stop command, etc. of the applicable, the
control returns to the main program (O0100). (Figure A)
[Program Example]
The control program of Motion program No. 10 is ended.
CLEAR P10 ;
REMARK
Even if the control program is stopped with the CLEAR instruction, a signal during
the set keep a set.