The text of a manual · part 52 of 60
SYSMAC CQM1/CPM1/CPM1A/SRM1 Programmable Controllers Programming Manual: Appendix B Error and Arithmetic Flag Operation
Pages 464 to 467 of 520, from SYSMAC CQM1/CPM1/CPM1A/SRM1 Programmable Controllers Programming Manual
The original document is the PDF (2.1 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.
For the Omron CQM1-CPU21
Page 464
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 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. The ER, CY, GT, LT and EQ Flags are turned OFF when END(01) is executed, so their status cannot be monitored 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 execution 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 differentiated 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)
TIM
25504 (CY) Unaffected
25505 (GR) Unaffected
25506 (EQ) Unaffected
25507 (LE) Unaffected
25402 (N) Unaffected
CNT
Page 209 210
END(01)
OFF
OFF
OFF
OFF
OFF
OFF
201
STEP(08)
Unaffected
Unaffected
Unaffected
Unaffected
Unaffected
Unaffected
206
SNXT(09) CNTR(12)
206 Unaffected
Unaffected
Unaffected
Unaffected
Unaffected
TIMH(15)
211 212
WSFT(16)
225
CMP(20)
Unaffected
MOV(21)
Unaffected
Unaffected Unaffected
242 232
Unaffected
232
MVN(22) BIN(23)
OFF
252
BCD(24)
Unaffected
253
ASL(25)
Unaffected
225
Unaffected
ASR(26)
OFF
226
ROL(27)
226
ROR(28)
227
COM(29) ADD(30) SUB(31)
Unaffected
Unaffected
Unaffected
Unaffected
Unaffected
308 Unaffected
278 279
447
Page 465
Appendix B
Error and Arithmetic Flag Operation Instructions
25503 (ER)
MUL(32)
25504 (CY)
25505 (GR)
Unaffected
Unaffected
25506 (EQ)
25507 (LE)
25402 (N)
Unaffected
Unaffected
Page 281
DIV(33)
282
ANDW(34)
309
ORW(35)
309
XORW(36)
310
XNRW(37)
311
INC(38)
Unaffected
DEC(39)
311 312
STC(40)
Unaffected
ON
Unaffected
Unaffected
Unaffected
Unaffected
278
CLC(41)
Unaffected
OFF
Unaffected
Unaffected
Unaffected
Unaffected
278
Unaffected
Unaffected
Unaffected
Unaffected
Unaffected
317
MSG(46) ADB(50)
Unaffected
289
Unaffected
SBB(51) MLB(52) DVB(53)
290 Unaffected
Unaffected Unaffected
ADDL(54)
291
Unaffected
Unaffected
Unaffected
Unaffected
Unaffected
292 Unaffected
SUBL(55) MULL(56)
284 285
Unaffected
Unaffected
Unaffected
Unaffected
DIVL(57)
286 287
BINL(58)
OFF
254
BCDL(59)
Unaffected
254
Unaffected
Unaffected
233
Unaffected
Unaffected
288
Unaffected
Unaffected
235
XFER(70)
Unaffected
Unaffected
ROOT(72)
Unaffected
Unaffected
XCHG(73)
Unaffected
Unaffected
Unaffected
BSET(71)
234 Unaffected
SLD(74)
228
SRD(75)
228
MLPX(76)
255
DMPX(77)
257
SDEC(78) DIST(80)
259 235
Unaffected
Unaffected
Unaffected
Unaffected
Unaffected
Unaffected
Unaffected
Unaffected
Unaffected
Unaffected
Unaffected
Unaffected
229
COLL(81) MOVB(82)
237
MOVD(83)
239 240
SFTR(84) TCMP(85)
Unaffected
Unaffected
Unaffected
Unaffected
243
ASC(86)
Unaffected
Unaffected
Unaffected
Unaffected
Unaffected
262
Unaffected
Unaffected
Unaffected
Unaffected
Unaffected
SBS(91) MCRO(99)
448
313 319
Page 466
Appendix B
Error and Arithmetic Flag Operation
Expansion Instructions (All CQM1/SRM1) 25504 (CY)
25505 (GR)
25506 (EQ)
25507 (LE)
25402 (N)
ASFT(17) TKY(18)
Instructions
25503 (ER)
Unaffected
Unaffected
Unaffected
Unaffected
Unaffected
MCMP(19)
Unaffected
Unaffected
RXD(47)
Unaffected
Unaffected
347 Unaffected
Unaffected
Unaffected
247
Unaffected
Unaffected
340
TXD(48) CMPL(60)
Page 230
342 Unaffected
INI(61)
246 Unaffected
Unaffected
Unaffected
Unaffected
220
PRV(62)
221
CTBL(63)
215
SPED(64)
330
PULS(65)
328
SCL(66)
Unaffected
Unaffected
Unaffected
Unaffected
BCNT(67) BCMP(68)
266 320
Unaffected
Unaffected
Unaffected
Unaffected
Unaffected
244
STIM(69)
213
DSW(87)1
346
7SEG(88)2
345
INT(89)
326
HKY(––)3
347
FPD(––) SRCH(––)
Unaffected Unaffected
Unaffected
Unaffected
Unaffected
Unaffected
322
Unaffected
Unaffected
337
MAX(––)
300
MIN(––)
301
APR(––)
305
COLM(––)
274
LINE(––)
273
HMS(––)
272
SEC(––)
271
SUM(––) FCS(––)
303 Unaffected
Unaffected
Unaffected
Unaffected
Unaffected
321
HEX(––)
263
AVG(––)
302
Note 1. Only expansion instructions with default function numbers are applicable to the SRM1 PCs. 2. SR 25410 will be ON when DSW(87) is being executed. 3. SR 25409 will be ON when 7SEG(88) is being executed. 4. SR 25408 will be ON when HKY(––) is being executed.
449
Page 467
Appendix B
Error and Arithmetic Flag Operation
Expansion Instructions Only) Instructions PWM(––) PID(––)
25503 (ER)
25504 (CY) Unaffected
25505 (GR) Unaffected
25506 (EQ) Unaffected
25507 (LE) Unaffected
338
ADBL(––)1
Unaffected
Unaffected
SBBL(––)1 MBS(––)
Page 336 293 294
Unaffected
Unaffected
Unaffected
296
DBS(––)
298
MBSL(––)
297
DBSL(––) CPS(––)
299 Unaffected
248
CPSL(––) NEG(––)2
249 Unaffected
Unaffected
Unaffected
NEGL(––)2 ZCP(––)
276 Unaffected
250
ZCPL(––) XFRB(––)
252 Unaffected
Unaffected
Unaffected
Unaffected
PLS2(––)
241 332
ACC(––)
334
SCL2(––) SCL3(––)
275
Unaffected
Unaffected
Unaffected
268
Unaffected
Unaffected
269
Note 1. Depending on the calculation results, ADBL(––) and SBBL(––) may also affect the status of the overflow and underflow flags (SR 25404 and SR 25405). 2. Depending on the conversion results, NEG(––) and NEGL(––) may also affect the status of the underflow flag (SR 25405).
450