Block Programming Instructions - Omron SYSMAC CS Series Instruction & Reference Manual

Hide thumbs Also See for SYSMAC CS Series:
Table of Contents

Advertisement

3. Instructions

Block Programming Instructions

Block Programming Instructions
Block Programs
• Up to 128 block programs within the overall user program (all tasks) with the CS/CJ-series. The
execution of each block program is controlled by a single execution condition. All instructions
between BPRG(096) and BEND<801) are executed unconditionally when the execution condition for
BPRG(096) is turned ON. The execution of all the block programming instructions except for
BPRG(096) is not affected by the execution condition. This allow programming that is to be executed
under a single execution condition to be grouped together in one block program.
• Each block is started by one execution condition in the ladder diagram and all instructions within the
block are written in mnemonic form. The block program is thus a combination of ladder and
mnemonic instructions.
• Block programs enable programming operations that can be difficult to program with ladder
diagrams, such as conditional branches and step progressions.
Example: The following example shows two block programs.
0.00
0.01
982
Block program area No. 1
1
When CIO 0.00 is ON, the contents of
block program 1 will be executed. The
MOV(021) and SET instructions will be
executed unconditionally and the block
D1
program will end.
0.05
2
Block program area No. 2
When CIO 0.01 is ON, the contents of
0.03
block program 2 will be executed. If CIO
0.04
0.03 and CIO 0.04 are both ON, the
binary addition will be performed (CIO
0.02 + #000A→D0.01).
2
If one or both of these bits is OFF, #0001
will be moved to D1. CIO 0.15 will then
D1
be set unconditionally and the block
program will end.
D1
0.15
CS/CJ/NSJ Series Instructions Reference Manual (W474)

Advertisement

Table of Contents
loading

Table of Contents