3. Instructions
Function
GSBN
GSBN(751) indicates the beginning of the
global
subroutine
subroutine number.
The region of the program beginning at the
first GSBN(751) instruction is the subroutine
region. A subroutine is executed only when it
has been called by GSBS(750).
GRET
GRET(752) indicates the end of a global
subroutine.
When
reaches GRET(752) it is automatically
returned to the next instruction after the
GSBS(750) instruction that called the global
subroutine.
Precautions
• Always place the global subroutines in
interrupt task 0.
698
with
the
specified
program
execution
Cyclic or interrupt task
GSBS
n
Interrupt task 0
GSBN
n
GRET
END
Not allowed
Cyclic task 1
GSBS
n
END
Cyclic task 2
GSBN
n
GRET
END
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Global
subroutine
region
OK
Cyclic task 1
GSBS
n
END
Interrupt task 0
GSBN
n
GRET
END
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