Block Programming Instructions - Omron CJ - REFERENCE MANUAL 02-2010 Reference Manual

Table of Contents

Advertisement

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
CS/CJ/NSJ Series Instructions Reference Manual (W474)
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
3. Instructions
3
1037

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the CJ - REFERENCE MANUAL 02-2010 and is the answer not in the manual?

Table of Contents