EasyManuals Logo

Omron CJ2 CPU UNIT SOFTWARE User Manual

Omron CJ2 CPU UNIT SOFTWARE
670 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #124 background imageLoading...
Page #124 background image
5 Understanding Programming
5-32
CJ2 CPU Unit Software User’s Manual
Additional Information
Global Subroutines
With regular subroutine instructions, it is not possible to call a subroutine in one task from a dif-
ferent task. Global subroutines can be created in interrupt task number 0, and these subroutines
can be called from any cyclic task (including extra cyclic tasks).
The GSBS instruction is used to call a global subroutine. The subroutine number must be
between 0 and 1,023. The global subroutine is defined at the end of interrupt task number 0 (just
before END(001)) between the GSBN and GRET instructions.
Global subroutines can be used to create a library of standard program sections that can be
called whenever necessary.
GSBN
n
GSBS
n
GSBS
n
GRET
END
Cyclic task (including extra
cyclic task)
Interrupt task 0
Call
n = 0 to 1,023
Multiple tasks
Return
Call
Global
subroutine
(shared
subroutine used
for standard
programming)
Cyclic task (including extra
cyclic task)
Execution
Return

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Omron CJ2 CPU UNIT SOFTWARE and is the answer not in the manual?

Omron CJ2 CPU UNIT SOFTWARE Specifications

General IconGeneral
BrandOmron
ModelCJ2 CPU UNIT SOFTWARE
CategorySoftware
LanguageEnglish

Related product manuals