Omron C200HE ユーザーズマニュアル

ページ / 564
523
Appendix C
Error and Arithmetic Flag Operation
The following table shows the instructions that affect the N, OF, UF, ER, CY, GR, LE and EQ flags.
 In general, N indicates a negative result, OF indicates that the result of a 16-bit calculation is greater than 32,767
(7FFF) or the result of a 32-bit calculation is greater than 2,147,483,647 (7FFF FFFF). UF indicates that the result
of a 16-bit calculation is less than –32,768 (8000) or the result of a 32-bit calculation is less than –2,147,483,648
(8000 0000). Refer to Section 5 Instruction Set for details.
ER indicates that operand data is not within requirements. CY indicates arithmetic or data shift results. GR indi-
cates that a compared value is larger than some standard, LT that it is smaller, and EQ, that it is the same. EQ also
indicates 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 instruction.
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.
All 8 flags are turned OFF when END(01) is executed, so their status cannot be monitored with a Programming
Console.
Mnemonic
25503
(ER)
25504
(CY)
25505
(GR)
25506
(EQ)
25507
(LE)
25404
(OF)
25405
(UF)
25402
(N)
Page
TIM
µ
---
---
---
---
---
---
---
159
CNT
µ
---
---
---
---
---
---
---
166
END (01)
OFF
OFF
OFF
OFF
OFF
OFF
OFF
OFF
158
SFT(10)
OFF
---
---
---
---
---
---
---
171
CNTR(12)
µ
---
---
---
---
---
---
---
169
TIMH(15)
µ
---
---
---
---
---
---
---
164
WSFT(16)
µ
---
---
---
---
---
---
---
178
CMP(20)
µ
---
µ
µ
µ
---
---
---
193
MOV(21)
µ
---
---
µ
---
---
---
µ
180
MVN(22)
µ
---
---
µ
---
---
---
µ
180
BIN(23)
µ
---
---
µ
---
---
---
OFF
204
BCD(24)
µ
---
---
µ
---
---
---
---
205
ASL(25)
µ
µ
---
µ
---
---
---
µ
175
ASR(26)
µ
µ
---
µ
---
---
---
OFF
175
ROL(27)
µ
µ
---
µ
---
---
---
µ
176
ROR(28)
µ
µ
---
µ
---
---
---
µ
176
COM(29)
µ
---
---
µ
---
---
---
µ
275
ADD(30)
µ
µ
---
µ
---
---
---
---
229
SUB(31)
µ
µ
---
µ
---
---
---
---
231
MUL(32)
µ
---
---
µ
---
---
---
---
235
DIV(33)
µ
---
---
µ
---
---
---
---
236
ANDW(34)
µ
---
---
µ
---
---
---
µ
276
ORW(35)
µ
---
---
µ
---
---
---
µ
277
XORW(36)
µ
---
---
µ
---
---
---
µ
278
XNRW(37)
µ
---
---
µ
---
---
---
µ
279
INC(38)
µ
---
---
µ
---
---
---
---
228
DEC(39)
µ
---
---
µ
---
---
---
---
228
STC(40)
---
ON
---
---
---
---
---
---
229