![Okuma OSP-P200L Programming Manual Download Page 303](http://html1.mh-extra.com/html/okuma/osp-p200l/osp-p200l_programming-manual_3667818303.webp)
5238-E P-290
SECTION 12 USER TASK
4-1-4. MODOUT Statement
[Program Format]
LE33013R0301400340001
[Function]
This is the statement to cancel the MODIN mode.
•
The MODIN mode must be canceled by a MODOUT statement designated in the same
program. That is, the MODIN mode activated in the main program cannot be canceled by a
MODOUT statement in the subprogram, and a MODIN mode active in the subprogram cannot
be canceled by a MODOUT statement in the main program.
•
The maximum number of subprograms usable in a single program is 125.
[Program Example]
Example of a program with MODIN and MODOUT statements
LE33013R0301400340002
The program is started from N001 of the main program and the commands up to N030 are executed
in the normal manner. On execution of the commands in N031, subprogram O1000 is called in the
MODIN mode. However, the subprogram is not executed in this block. When the axis motion
commands in block N032 are completed, subprogram O1000 is called and executed up to N1040 in
that subprogram. The RTS statement causes a jump to the main program and the next in the main
program, N033, is then executed. The same step is repeated up to block N039 in the main program.
The MODOUT statement in N040 cancels the MODIN mode and the commands in the blocks after
N041 are executed in the normal manner.
N0
MODOUT
Sequence name of this block (can be omitted)
Designates a MODOUT statement
Subprogram
G00
MODIN
X
X
X
MODOUT
M02
N001
N030
N031
N032
N033
N034
N035
N040
N060
X
O1000
Z
Z
Z
Z
O1000
N1001
N1002
N1040
G01
RTS
X Z F
Main Program