438
5-38 Block Programming Instructions
Block programming can be used with version-2 CVM1 CPUs to program opera-
tions that are difficult to program with ladder diagrams, such as certain data com-
putations. Effective block programming can be use to reduce the number of pro-
gramming steps required for certain operations, thus reducing the cycle time
and increasing overall processing speed.
A maximum of 100 block programs can be used.
5-38-1 Overview
Instructions The following block programming instructions are available.
Name Mnemonic Function
BLOCK PROGRAM
BEGIN
BPRG(250) Changes to block programming
(BPRG(250) is actually a ladder
diagram instruction.)
BLOCK PROGRAM
END
BEND<001> Ends a block program.
IF (NOT) IF<002> (NOT) Starts conditional branching.
ELSE ELSE<003> Marks the alternate route for
conditional branching.
IF END IEND<004> Ends conditional branching.
ONE CYCLE AND
WAIT (NOT)
WAIT<005> (NOT) Creates a conditional one-cycle wait.
CONDITIONAL
BLOCK EXIT (NOT)
EXIT <006> (NOT) Conditionally ends block program
execution.
LOOP LOOP<009> Starts a loop.
LOOP END (NOT) LEND<010>(NOT) Ends a loop.
BLOCK PROGRAM
PAUSE
BPPS<011> Temporarily stops block program
execution.
BLOCK PROGRAM
RESTART
BPRS<012> Restarts block program execution.
TIMER WAIT TIMW<013> Creates a timed wait.
COUNTER WAIT CNTW<014> Creates a wait based on a counter.
HIGH-SPEED
TIMER WAIT
TMHW<015> Creates a high-speed timed wait.
Restricted Instructions Although most ladder-diagram instructions can also be used in mnemonic form
within a block program, there are restrictions for the following instructions.
LD, LD NOT, AND, AND NOT, AND LD, OR LD, UP(018), DOWN(19),
EQU(025), symbol comparison instructions (300 to 328), TST(350), and
TSTN(351).
The instructions must be combined with either the IF<002>, WAIT<005>,
EXIT<006>, or LEND<010> instructions, or with ladder-diagram jump instruc-
tions.
Note The operation of the above instructions will not be dependable is they are not
used in combination as described or if they are used in combination with other
instructions.
Block Programming Instructions Section 5-38