Omron CS1G/H-CPUxxH Instructions Manual page 756

Sysmac cs series; sysmac cj series
Hide thumbs Also See for CS1G/H-CPUxxH:
Table of Contents

Advertisement

Subroutines
Global Subroutines and
Differentiation
Subroutine functions
divided by task.
An SBS(091) or GSBS(750) instruction can be written within a subroutine
region (SBN(092) to RET(093)) or global subroutine region (GSBN(751) to
GRET(752)) to "nest" subroutines. Subroutines can be nested up to 16 levels.
Interrupt task 0
GSBN 10
GSBS 11
Observe the following precautions when using differentiated instructions
(DIFU(013), DIFU(014), or up/down differentiated instructions) in subroutines.
The operation of differentiated instructions in a global subroutine is unpredict-
able if a subroutine is executed more than once in the same cycle. In the fol-
lowing example, global subroutine 0001 is executed when CIO 000000 is ON
and CIO 000100 is turned ON by DIFU(013) when CIO 000001 has gone
Cyclic or interrupt task
000000
GSBS
n
B
000001
GSBS
m
D
END
Interrupt task 0
GSBN
n
A
GRET
GSBN
m
C
GRET
END
GSBN 11
GSBN 12
to
to
GSBS 12
to
to
GRET
GRET
Section 3-19
Execution
condition ON
B
Execution
condition ON
D
A
C
to
GRET
735

Advertisement

Table of Contents
loading

Table of Contents