Global Subroutine Return: Gret(752) - Omron SYSMAC CJ - REFERENCE MANUAL 01-2008 Reference Manual

Sysmac cs/cj/one nsj series programmable controllers
Table of Contents

Advertisement

Subroutines
Example

3-19-7 GLOBAL SUBROUTINE RETURN: GRET(752)

Purpose
Ladder Symbol
Variations
Applicable Program Areas
Description
Precautions
Example
836
When CIO 000000 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.
Cyclic or interrupt task
000000
Interrupt task 0
Indicates the end of a subroutine program. Used in combination with
GSBN(751) to define a subroutine region.
This instruction is supported by CS1-H, CJ1-H, CJ1M, and CS1D CPU Units
only.
GRET(752) is used in combination with GSBS(750) and GSBN(751), the
GLOBAL SUBROUTINE CALL and GLOBAL SUBROUTINE ENTRY instruc-
tions.
GRET(752)
Variations
Executed Each Cycle for ON Condition
Immediate Refreshing Specification
Block program areas
Not allowed
Not allowed
GRET(752) indicates the end of a global subroutine and GSBN(751) indicates
the beginning of a global subroutine. See 3-19-6 GLOBAL SUBROUTINE
ENTRY: GSBN(751) for more details on the operation of global subroutines.
When program execution reaches GRET(752) it is automatically returned to
the next instruction after the GSBS(750) instruction that called the global sub-
routine.
When the subroutine is not being executed, the instructions are treated as
NOP(000).
See 3-19-6 GLOBAL SUBROUTINE ENTRY: GSBN(751) for examples of the
operation of GRET(752).
GSBS
#10
GSBN
Global subroutine
#10
region
GRET
END
Step program areas
Subroutines
Not allowed
Section 3-19
GRET(752)
Not supported
Interrupt tasks
OK

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents