![background image](http://html1.mh-extra.com/html/omron/sysmac-cs-series/sysmac-cs-series_reference-manual_7420301227.webp)
1187
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.
Содержание SYSMAC CS Series
Страница 2: ......
Страница 4: ...iv ...
Страница 30: ...xxx ...
Страница 186: ...146 List of Instructions by Function Code Section 2 4 ...
Страница 194: ...154 3 35 4 MOVE BIT MOVBC 568 1273 3 35 5 BIT COUNTER BCNTC 621 1275 3 35 6 GET VARIABLE ID GETID 286 1277 ...
Страница 1320: ...1280 Model Conversion Instructions Unit Ver 3 0 or Later Section 3 35 ...
Страница 1390: ...1350 CJ series Instruction Execution Times and Number of Steps Section 4 2 ...
Страница 1391: ...1351 Appendix A ASCII Code Table ASCII SP Four leftmost bits Four rightmost bits ...
Страница 1392: ...1352 ASCII Code Table Appendix A ...
Страница 1404: ...1364 Revision History ...