![Omron CJ1G-CPUxx Instructions Manual Download Page 751](http://html1.mh-extra.com/html/omron/cj1g-cpuxx/cj1g-cpuxx_instructions-manual_742491751.webp)
730
Subroutines
Section 3-19
Precautions
When the subroutine isn’t being executed, the instructions are treated as
NOP(000).
Place the subroutines after the main program and just before the END(001)
instruction in the program for each task. If part of the main program is placed
after the subroutine region, that program section will be ignored.
Note The input method for the subroutine number, N, is different for the CX-Pro-
grammer and a Programming Console. Input #0 to #1023 on the CX-Program-
mer and 0000 to 1023 on a Programming Console.
Be sure to place each subroutine in the same program (task) as its corre-
sponding SBS(091) or MCRO(099) instruction. A subroutine in one task can’t
be called from another task. It is possible to program a subroutine within an
interrupt task.
SBS
n
MCRO
n
SBN
n
RET
Subroutine
region
Subroutine region
OR
This part of the
program won't be
executed.
Summary of Contents for CJ1G-CPUxx
Page 3: ...iv N o t i c e ...
Page 5: ...vi ...
Page 21: ...xxii Conformance to EC Directives 6 ...
Page 35: ......
Page 1131: ...1110 CJ series Instruction Execution Times and Number of Steps Section 4 2 ...