EasyManuals Logo
Home>Omron>Controller>CJ - INSTRUCTIONS

Omron CJ - INSTRUCTIONS User Manual

Omron CJ - INSTRUCTIONS
1308 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #737 background imageLoading...
Page #737 background image
699
3. Instructions
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Subroutines
3
GSBS
GSBS
Applicable Program Areas
Operands
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.
Note Global subroutine numbers and regular subroutine numbers (SBS instructions and MCRO instruction operands) are
shared (do not use the same number for a global subroutine and a regular subroutine).
z Operand Specifications
Combined-use instructions
GSBS(750) is used in combination with GSBN(751) and GRET(752), the GLOBAL SUBROUTINE
ENTRY and GLOBAL SUBROUTINE RETURN instructions.
Flags
Instruction Mnemonic Variations
Function
code
Function
GLOBAL SUBROUTINE CALL GSBS @GSBS 750
Calls the global subroutine with the specified
subroutine number and executes that program.
Symbol
GSBS
Area
Function block
definitions
Block program areas Step program areas Subroutines Interrupt tasks
SFC action or transition
programs
Usage Not allowed OK OK OK OK Not allowed
Operand Description
Data type
Size
SBN
N Global 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
N --- --- --- --- --- --- --- --- --- --- OK --- --- --- --- --- --- ---
Name Label Operation
Error Flag P_ER • ON if nesting exceeds 16 levels (counting both regular and global subroutines).
• ON if the specified global subroutine does not exist.
• ON if a global subroutine calls itself.
• ON if a global subroutine being executed is called.
• ON if the specified subroutine is not defined in interrupt task 0.
• OFF in all other cases.
N: Global subroutine number
GSBS(750)
N

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Omron CJ - INSTRUCTIONS and is the answer not in the manual?

Omron CJ - INSTRUCTIONS Specifications

General IconGeneral
BrandOmron
ModelCJ - INSTRUCTIONS
CategoryController
LanguageEnglish

Related product manuals