Omron SYSMAC CJ - REFERENCE MANUAL 08-2008 Reference Manual page 1227

Programmable controllers
Hide thumbs Also See for SYSMAC CJ - REFERENCE MANUAL 08-2008:
Table of Contents

Advertisement

Block Programming Instructions
Tasks and Block Programs
The following example shows two block programs.
1
2
Block programs can be located within tasks. While tasks are used to divide
large programming units, block programs can be used within tasks to further
divide programming into smaller units controlled with a single ladder diagram
execution condition.
Just like tasks, block programs that are that are not executed (i.e., which have
an OFF execution condition) do not require execution time and can thus be
used to reduce the cycle time (somewhat the same as jumps). Also like tasks,
other blocks can be paused or restarted from within a block program.
There are, however, differences between tasks and block programs. One dif-
ference is that input conditions are not used with block programs unless inten-
tionally programmed with IF(802), WAIT(805), EXIT(806), IEND(810) or other
instructions. Also, there are some instructions that cannot be used within
block programs, such as those that detect upward and downward differentia-
tion.
Block programs can be used either within cyclic tasks or interrupt tasks. Each
block program number from 0 to 127 can be used only once and cannot be
use again, even in a different task.
Block program area No. 1
When CIO 000000 is ON, the contents
of block program 1 will be executed.
The MOV(021) and SET instructions
will be executed unconditionally and
the block program will end.
Block program area No. 2
When CIO 000001 is ON, the contents
of block program 2 will be executed. If
CIO 000003 and CIO 000004 are both
ON, the binary addition will be performed
(CIO 0002 + #000A D00001).
If one or both of these bits is OFF,
#0001 will be moved to D00001. CIO
000015 will then be set unconditionally
and the block program will end.
Section 3-32
1187

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sysmac cs seriesSysmac one nsj seriesSysmac cj series

Table of Contents