457
Appendix B
Error and Arithmetic Flag Operation
The following table shows the instructions that affect the ER, CY, GT, LT and EQ flags. In general, ER indicates
that operand data is not within requirements. CY indicates arithmetic or data shift results. GT indicates that a
compared value is larger than some standard, LT that it is smaller, and EQ, that it is the same. EQ also indi-
cates a result of zero for arithmetic operations. Refer to SECTION 5 Instruction Set for details.
Vertical arrows in the table indicate the flags that are turned ON and OFF according to the result of the instruc-
tion.
Although ladder diagram instructions, TIM, and CNT are executed when ER is ON, other instructions with a
vertical arrow under the ER column are not executed if ER is ON. All of the other flags in the following table will
also not operate when ER is ON.
Instructions not shown do not affect any of the flags in the table. Although only the non-differentiated form of
each instruction is shown, differentiated instructions affect flags in exactly the same way.
The ER, CY, GT, LT and EQ Flags are turned OFF when END(01) is executed, so their status cannot be moni-
tored with a Programming Device.
The status of the ER, CY, GT, LT and EQ Flags is affected by instruction execution and will change each time
an instruction that affects them is executed. Differentiated instructions are executed only once when their exe-
cution condition changes (ON to OFF or OFF to ON) and are not executed again until the next specified
change in their execution condition. The status of the ER, CY, GT, LT and EQ Flags is thus affected by a differ-
entiated instruction only when the execution condition changes and is not affected during scans when the
instruction is not executed, i.e., when the specified change does not occur in the execution condition. When a
differentiated instruction is not executed, the status of the ER, CY, GT, LT and EQ Flags will not change and will
maintain the status produced by the last instruction that was executed.
Instructions 25503 (ER) 25504 (CY) 25505 (GR) 25506 (EQ) 25507 (LE) 25402 (N) Page
TIM Unaffected Unaffected Unaffected Unaffected Unaffected 213
CNT 214
END(01) OFF OFF OFF OFF OFF OFF 205
STEP(08) Unaffected Unaffected Unaffected Unaffected Unaffected Unaffected 210
SNXT(09) 210
CNTR(12) Unaffected Unaffected Unaffected Unaffected Unaffected 216
TIMH(15) 217
WSFT(16) 230
CMP(20) Unaffected Unaffected 248
MOV(21) Unaffected Unaffected Unaffected 237
MVN(22) 238
BIN(23) OFF 258
BCD(24) Unaffected 259
ASL(25) Unaffected Unaffected 230
ASR(26) OFF 231
ROL(27) 231
ROR(28) 232
COM(29) Unaffected Unaffected Unaffected 316
ADD(30) Unaffected Unaffected Unaffected 285
SUB(31) 286