3. Instructions
1058
CS/CJ/NSJ Series Instructions Reference Manual (W474)
• If execution is to wait until for a specified count has been reached (e.g., for step progressions with
counters), then CNTW(814)/CNTWX(818) is used.
• If execution is to be repeated within part of a block program until a condition is met, then LOOP(809)
and LEND(810) are used.
• If execution of the block program is to be ended in the middle based on an execution condition, the
EXIT(806) is used.
• If another block program that is being executed is to be paused or restarted from within a block
program, then BPPS(811) and BPRS(812) are used.
z Instructions Taking Execution Conditions within Block Programs
The following instruction can take execution conditions within a block program.
Instructions with Application Restrictions within Block Programs
The instructions listed in the following table can be used only to create execution conditions for IF(802),
WAIT(805), EXIT(806), LEND(810), CJP(510, or CJPN(511) and cannot be used by themselves. The
execution of these instructions may be unpredictable if used by themselves or in combination with any
other instructions.
z Instructions with usage restrictions
(Instructions used only as execution conditions IF, WAIT, EXIT, and LEND)
Instruction type Instruction name Mnemonic
Block programming instructions IF (NOT) IF(802) (NOT)
ONE CYCLE AND WAIT (NOT) WAIT(805) (NOT)
EXIT EXIT(806) NOT
LOOP END LEND(810) NOT
Ladder diagram instructions CONDITIONAL JUMP CJP(510)
CONDITIONAL JUMP NOT CJPN(511)
Mnemonic Name
LD/LD NOT LOAD/LOAD NOT
AND/AND NOT AND/AND NOT
OR/OR NOT OR/OR NOT
UP/DOWN CONDITION ON/CONDITION OFF
>, <,=, >=, <=, <> (S) (L) Symbol Comparison Instruction (not right-hand instructions)
LD TST/TST NOT LOAD Bit Test Instructions
AND TST/TST NOT AND Bit Test Instructions
OR TST/TST NOT OR Bit Test Instructions
>$, <$,=$, >=$, <=$, <>$ Text String Comparison Instruction
Good Example
Bad Example
Used as
execution
condition
for IF.
0.00
1.00
D1
0.00
1.00
D1
10
Cannot be
used as
execution
condition
for
MOV(021).