Omron SYSMAC CS Series Instruction & Reference Manual page 658

Hide thumbs Also See for SYSMAC CS Series:
Table of Contents

Advertisement

3. Instructions
• The step instructions, STEP(008) and
SNXT(009) cannot be used in global
subroutines.
• Place the global subroutine region (GSBN(751) to GRET(752)) in interrupt task 0 just before the
END(001) instruction. When two or more global subroutines are being used, group them together in
interrupt task 0 after the end of the main program. If part of the main program is placed after the
global subroutine region, that program section will be ignored.
Interrupt task 0
Example Programming
When CIO 0.00 is ON in the following
example, global subroutine 10 is executed
and program execution returns to the next
instruction after the GSBS(750) instruction
that called the subroutine.
624
GSBN
Global
n
subroutine
region
GRET
This part of the
program will not
be executed.
END
GSBN
SNXT
STEP
GRET
Note : The input method for the global
subroutine number, N, is different
for the CX-Programmer and a
Programming Console. Input #0
to #1023 on the CX-Programmer
and 0 to 1023 on a Programming
Console.
Cyclic or interrupt task
0.00
GSBS
#10
Interrupt task 0
GSBN
#10
GRET
END
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Not allowed
Global subroutine
region

Advertisement

Table of Contents
loading

Table of Contents