![background image](http://html1.mh-extra.com/html/omron/sysmac-cs1d-cpu/sysmac-cs1d-cpu_reference-manual_7422681227.webp)
1188
Block Programming Instructions
Section 3-32
The following example shows two block programs.
Tasks and Block Programs
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.
1
2
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.
Summary of Contents for SYSMAC CS1D-CPU**
Page 3: ...iv...
Page 29: ...xxx...
Page 185: ...146 List of Instructions by Function Code Section 2 4...
Page 1389: ...1350 CJ series Instruction Execution Times and Number of Steps Section 4 2...
Page 1390: ...1351 Appendix A ASCII Code Table ASCII SP Four leftmost bits Four rightmost bits...
Page 1391: ...1352 ASCII Code Table Appendix A...