Subroutines
Examples
Example 1
When CIO 000000 is ON in the following example, global subroutine 1 is exe-
cuted and program execution returns to the next instruction after GSBS(750).
Status of CIO 000000
ON
OFF
When CIO 000001 is ON in the following example, global subroutine 1 is exe-
cuted and program execution returns to the next instruction after GSBS(750).
Status of CIO 000000
ON
OFF
Cyclic or interrupt task
A
000000
GSBS
n
B
END
Interrupt task 0
GSBN
Global
subroutine
program S
GRET
END
Example 2
Two or more global subroutine programs can be programmed in interrupt task
0. In this case, interrupt task 0 can be divided and used as the subroutine
function's task.
Order of program execution
A
S
B
A
B
Order of program execution
C
S
D
C
D
Cyclic or interrupt task
000001
CIO 000000 ON
1
Section 3-19
C
CIO 000000 ON
GSBS
n
D
END
831
Need help?
Do you have a question about the SYSMAC CJ - REFERENCE MANUAL 01-2008 and is the answer not in the manual?