12
7.4 Bit processing instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349
7.4.1 BSET, BSETP Bit set for word devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .349
BRST, BRSTP Bit reset for word devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . .349
7.4.2 TEST, TESTP, DTEST, Bit tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .350
DTESTP
7.4.3 BKRST, BKRSTP Batch reset of bit devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . .352
7.5 Data processing instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354
7.5.1 SER, SERP 16-bit data search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .354
DSER, DSERP 32-bit data search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .354
7.5.2 SUM, SUMP 16-bit data check . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .356
DSUM, DSUMP 32-bit data check . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .356
7.5.3 DECO, DECOP Decoding from 8 to 256 bits . . . . . . . . . . . . . . . . . . . . . . . . . . .358
7.5.4 ENCO, ENCOP Encoding from 256 to 8 bits . . . . . . . . . . . . . . . . . . . . . . . . . . .359
7.5.5 SEG, SEGP 7-segment decode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .360
7.5.6 DIS, DISP 4-bit dissociation of 16-bit data . . . . . . . . . . . . . . . . . . . . . . . . .362
7.5.7 UNI, UNIP 4-bit linking of 16-bit data . . . . . . . . . . . . . . . . . . . . . . . . . . . . .363
7.5.8 NDIS, NDISP Dissociation of random data . . . . . . . . . . . . . . . . . . . . . . . . . . .365
NUNI, NUNIP Linking of random data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .365
7.5.9 WTOB, WTOBP Data dissociation in byte units . . . . . . . . . . . . . . . . . . . . . . . . .368
BTOW, BTOWP Data linking in byte units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .368
7.5.10 MAX, MAXP Maximum value search for 16-bit data . . . . . . . . . . . . . . . . . . .371
DMAX, DMAXP Maximum value search for 32-bit data . . . . . . . . . . . . . . . . . . .371
7.5.11 MIN, MINP Minimum value search for 16-bit data . . . . . . . . . . . . . . . . . . .373
DMIN, DMINP Minimum value search for 32-bit data . . . . . . . . . . . . . . . . . . .373
7.5.12 SORT BIN 16 bit-data sort operations . . . . . . . . . . . . . . . . . . . . . . . . .375
DSORT BIN 32 bit-data sort operations . . . . . . . . . . . . . . . . . . . . . . . . .375
7.5.13 WSUM, WSUMP Calculation of totals for 16-bit data . . . . . . . . . . . . . . . . . . . . . .378
7.5.14 DWSUM, DWSUMP Calculation of totals for 32-bit data . . . . . . . . . . . . . . . . . . . . . .379
7.5.15 MEAN, MEANP Calculation of averages for 16-bit data . . . . . . . . . . . . . . . . . . .381
DMEAN, DMEANP Calculation of averages for 32-bit data . . . . . . . . . . . . . . . . . . .381
7.6 Structure creation instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 383
7.6.1 FOR, NEXT FOR to NEXT instruction loop . . . . . . . . . . . . . . . . . . . . . . . . .383
7.6.2 BREAK, BREAKP Forced end of FOR to NEXT instruction loop . . . . . . . . . . . . . .385
7.6.3 CALL, CALLP Subroutine program calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . .386
7.6.4 RET Return from subroutine programs . . . . . . . . . . . . . . . . . . . . . . .390
7.6.5 FCALL, FCALLP Subroutine program output OFF calls . . . . . . . . . . . . . . . . . . .391
7.6.6 ECALL, ECALLP Subroutine calls between program files . . . . . . . . . . . . . . . . . .395
7.6.7 EFCALL, EFCALLP Subroutine output OFF calls between program files . . . . . . . .399
7.6.8 XCALL Subroutine program calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . .404
7.6.9 COM Refresh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .407
7.6.10 COM Select refresh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .409
7.6.11 CCOM, CCOMP Select refresh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .412
7.6.12 IX, IXEND Index modification of entire ladder . . . . . . . . . . . . . . . . . . . . . .413
7.6.13 IXDEV, IXSET Designation of modification values in index modification
of entire ladders . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .416
7.7 Data Table Operation Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .418
7.7.1 FIFW, FIFWP Writing data to the data table . . . . . . . . . . . . . . . . . . . . . . . . . .418