EasyManuals Logo
Home>Omron>Controller>CJ - INSTRUCTIONS

Omron CJ - INSTRUCTIONS User Manual

Omron CJ - INSTRUCTIONS
1308 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 #727 background imageLoading...
Page #727 background image
689
3. Instructions
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Subroutines
3
SBS
Precautions
• The subroutine number must be unique
for each subroutine. You cannot use the
same number for more than one
subroutine.
• Each subroutine must have a unique
subroutine number. Do not use the
same subroutine number for more than
one subroutine.
• Observe the following precautions
when using differentiated instructions
(DIFU(013), DIFD(014), or up/down
differentiated instructions) in
subroutines.
• The operation of differentiated
instructions in a subroutine is unpre-
dictable if a subroutine is executed
more than once in the same cycle.
In the following example, subroutine
1 is executed when CIO 0.00 is ON
and CIO 1.00 is turned ON by
DIFU(013) when CIO 0.01 has
gone from OFF to ON. If CIO 0.01
is ON in the same cycle, subroutine
1 will be executed again but this
time DIFU(013) will turn CIO 1.00
OFF without checking the status of
CIO 0.01.
• In contrast, a differentiated instruc-
tion (UP, DOWN, DIFU(013) or
DIFD(014)) would maintain the ON
status if the instruction was exe-
cuted and the output was turned ON
but the same subroutine was not
called a second time.
• In the following example, subroutine
1 is executed if CIO 0.00 is ON.
Output CIO 1.00 is turned ON by
DIFU(013) when CIO 0.01 has
gone from OFF to ON. If CIO 0.00
is OFF in the following cycle, sub-
routine 1 will not be executed again
and output CIO 1.00 will remain ON
• SBS(091) will be treated as
NOP(000) when it is within a pro-
gram section interlocked by IL(002)
and ILC(003).
1
3
2
4
5
1
1
1
0.00
0.01
0.01
1.00
Subroutine
1
The subroutin
e
is executed
again.
1
3
2
1
1
1.00
0.00
0.01
The subroutine is
not executed in
following cycles.

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Omron CJ - INSTRUCTIONS and is the answer not in the manual?

Omron CJ - INSTRUCTIONS Specifications

General IconGeneral
BrandOmron
ModelCJ - INSTRUCTIONS
CategoryController
LanguageEnglish

Related product manuals