3. Instructions
696
CS/CJ/NSJ Series Instructions Reference Manual (W474)
SBN/RET
Applicable Program Areas
z SBN
z RET
Operands
z SBN
N: Subroutine number
Specifies the subroutine number between 0 and 1023 decimal.
Note For CJ1M-CPU11 and CJ1M-CPU21 CPU Units, the subroutine number must be between the range 0 to 255
decimal.
z Operand Specifications
Combined-use instructions
SBS (subroutine call) instruction or MCRO (macro) instruction
Instruction Mnemonic Variations
Function
code
Function
SUBROUTINE ENTRY SBN --- 092
Indicates the beginning of the subroutine program with
the specified subroutine number.
SUBROUTINE RETURN RET --- 093 Indicates the end of a subroutine program.
Symbol
SBN RET
Area
Function block
definitions
Block program areas Step program areas Subroutines Interrupt tasks
SFC action or transition
programs
Usage Not allowed Not allowed Not allowed Not allowed OK Not allowed
Area
Function block
definitions
Block program areas Step program areas Subroutines Interrupt tasks
SFC action or transition
programs
Usage Not allowed Not allowed Not allowed OK OK Not allowed
Operand Description
Data type
Size
SBN
N Subroutine number --- 1
Area
Word addresses
Indirect DM/EM
addresses
Con-
stants
Registers Flags
Pulse
bits
TR
bits
CIO WR HR AR T C DM EM
@DM
@EM
*DM
*EM
DR IR
Indirect
using IR
TK CF
SBN N --- --- --- --- --- --- --- --- --- --- OK --- --- --- --- --- --- ---
N: Subroutine number
SBN(092)
N
RET(093)