![Omron CJ1G-CPU series Programming Manual Download Page 144](http://html1.mh-extra.com/html/omron/cj1g-cpu-series/cj1g-cpu-series_programming-manual_742489144.webp)
123
Subroutine Instructions
Section 3-17
3-17 Subroutine Instructions
Instruction
Mnemonic
Code
Symbol/Operand
Function
Location
Execution
condition
SUBROUTINE
CALL
SBS
@SBS
091
Output
Required
MACRO
MCRO
@MCRO
099
Output
Required
SUBROUTINE
ENTRY
SBN
092
Output
Not required
SUBROUTINE
RETURN
RET
093
Indicates the end of a subroutine program.
Output
Not required
N: Subroutine
number
SBS(091)
N
Main program
Subroutine
program
(SBN(092) to
RET(093))
Execution condition ON
Program end
Calls the subroutine with the specified subroutine number and executes that
program.
N: Subroutine
number
S: 1st input
parameter word
D: 1st output
parameter word
MCRO(099)
N
S
D
MCRO(099)
MCRO(099)
Execution of subroutine
between SBN(092) and
RET(093).
The subroutine uses A600
to A603 as inputs and A604
to A607 as outputs.
Calls the subroutine with the specified subroutine number and executes that
program using the input parameters in S to S+3 and the output parameters in
D to D+3.
N: Subroutine
number
SBN(092)
N
Subroutine region
or
Indicates the beginning of the subroutine program with the specified
subroutine number.
RET(093)
Summary of Contents for CJ1G-CPU series
Page 3: ...iv...
Page 5: ...vi...
Page 21: ...xxii Conformance to EC Directives 6...
Page 169: ...148 Task Control Instructions Section 3 32...
Page 203: ...182 Programming Device Operations for Tasks Section 4 4...
Page 253: ...232 Using File Memory Section 5 3...
Page 337: ...316 Other Functions Section 6 11...
Page 347: ......
Page 369: ......
Page 373: ......
Page 379: ......
Page 381: ...360 Revision History...