Omron CJ - INSTRUCTIONS REFERENCE MANUAL 07-2009 Reference Manual page 729

Programmable controllers
Hide thumbs Also See for CJ - INSTRUCTIONS REFERENCE MANUAL 07-2009:
Table of Contents

Advertisement

3. Instructions
Function
GSBS(750) calls the global subroutine with the specified global subroutine number. The global
subroutine is the program section between GSBN(751) and GRET(752). When the global subroutine is
completed, program execution continues with the next instruction after GSBS(750).
The same global subroutine region (GSBN(751) to GRET(752)) can be called more than once.
This instruction can be written into multiple tasks with the same global subroutine number to call that
program from the different tasks. The program can be modularized by making global subroutines into
standard subroutines that are common to many tasks.
The global subroutine region (between GSBN(751) and GRET(752)) must be defined in interrupt task
0. If it is defined in another task, an error will occur and the Error Flag will be turned ON when the
GSBS(750) instruction is executed.
The GSBS(750) instruction can be written in both cyclic tasks (including extra cyclic tasks) and interrupt
tasks.
Cyclic or interrupt task
0.00
692
Cyclic or interrupt task
0.01
GSBS
GSBS
n
n
B
C
Interrupt task 0
GSBN
Global subroutine
n
program
(GSBN(751) to
GRET(752))
A
GRET
END
Execution
Execution
condition
condition
(0.00) ON
(0.01) ON
Main
program
B
C
A
A
CS/CJ/NSJ Series Instructions Reference Manual (W474)

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the CJ - INSTRUCTIONS REFERENCE MANUAL 07-2009 and is the answer not in the manual?

Questions and answers

Table of Contents