Subroutine Instructions - Omron CJ - PROGRAMMING MANUAL 08-2008 Programming Manual

Programmable controllers
Hide thumbs Also See for CJ - PROGRAMMING MANUAL 08-2008:
Table of Contents

Advertisement

Subroutine Instructions

3-17 Subroutine Instructions

Instruction
Symbol/Operand
Mnemonic
Code
SUBROUTINE
SBS(091)
CALL
SBS
@SBS
091
N: Subroutine
number
MACRO
MCRO(099)
MCRO
@MCRO
099
N: Subroutine
number
S: 1st input
parameter word
D: 1st output
parameter word
SUBROUTINE
SBN(092)
ENTRY
SBN
092
N: Subroutine
number
SUBROUTINE
RET(093)
RETURN
RET
093
Calls the subroutine with the specified subroutine number and
executes that program.
N
Calls the subroutine with the specified subroutine number and
executes that program using the input parameters in S to S+3 and the
N
output parameters in D to D+3.
S
MCRO(099)
D
MCRO(099)
Indicates the beginning of the subroutine program with the specified
subroutine number.
N
Indicates the end of a subroutine program.
Function
Execution condition ON
Main program
Subroutine
program
(SBN(092) to
RET(093))
Execution of sub-
routine between
SBN(092) and
RET(093).
The subroutine uses A600 to
A603 as inputs and A604 to
A607 as outputs.
or
Subroutine region
Section 3-17
Location
Execution condition
Output
Required
Program end
Output
Required
Output
Not required
Output
Not required
131

Advertisement

Table of Contents
loading

Table of Contents