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

Cp1h/cp1l cpu unit
Table of Contents

Advertisement

Subroutines
Precautions
The GSBS(750) instruction can be written both cyclic tasks (including extra
cyclic tasks) and interrupt tasks.
Cyclic or interrupt task
GSBS
n
Interrupt task 0
GSBN
n
GRET
END
• When the subroutine is not being executed, the instructions are treated as
NOP(000).
• Place the global subroutine region (GSBN(751) to GRET(752)) in inter-
rupt 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 1
GSBN
n
GRET
END
Global
subroutine
region
Global
subroutine
region
This part of the
program will not
be executed.
Section 3-18
689

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents