Omron CP - PROGRAMMING MANUAL 05-2007 Programming Manual page 718

Cp1h/cp1l cpu unit
Table of Contents

Advertisement

Subroutines
Flags
Precautions
1,2,3...
Cyclic task 1
0.00
GSBS
1
Interrupt task 0
GSBN
1
0.01
DIFU
000100
GRET
Name
Label
Error Flag
ER
The GLOBAL SUBROUTINE ENTRY instruction, GSBN(751), and the corre-
sponding GLOBAL SUBROUTINE RETURN instruction, GRET(752) must be
programmed in interrupt task 0. If the global subroutine region is not pro-
grammed in interrupt task 0, an error will occur and the Error Flag will be
turned ON when the GSBS(750) instruction is executed.
The regular SUBROUTINE CALL instruction, SBS(091), cannot call a global
subroutine region (GSBN(751) to GRET(752)).
GSBS(750) will not be executed when it is within a program section inter-
locked by IL(002) and ILC(003), so interlocks are not allowed within global
subroutine regions.
The same global subroutine region (GSBN(751) to GRET(752)) can be called
more than once.
When GSBS(750) is executed in the following cases, the global subroutine will
not actually be called and the Error Flag will be turned ON:
1. The specified global subroutine is not defined.
2. Subroutine nesting (counting both regular and global subroutines) ex-
ceeds 16 levels.
3. The global subroutine is calling itself.
4. The specified global subroutine is being executed.
5. The specified global subroutine is not defined in interrupt task 0.
The subroutine is
not executed in
following cycles.
Operation
ON if nesting exceeds 16 levels (counting both regular
and global subroutines).
ON if the specified global subroutine does not exist.
ON if a global subroutine calls itself.
ON if a global subroutine being executed is called.
ON if the specified subroutine is not defined in interrupt
task 0.
OFF in all other cases.
Section 3-18
685

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents