Mitsubishi MELSEC QCPU Programming Manual page 9

Programmable logic controller
Table of Contents

Advertisement

7.2 Rotation Instruction................................................................................................................................. 7 - 30
7.2.1 Right rotation of 16-bit data (ROR, RORP, RCR, RCRP) .............................................................. 7 - 30
7.2.2 Left rotation of 16-bit data (ROL, ROLP, RCL, RCLP) ................................................................... 7 - 32
7.2.3 Right rotation of 32-bit data (DROR, DRORP, DRCR, DRCRP).................................................... 7 - 34
7.2.4 Left rotation of 32-bit data (DROL, DROLP, DRCL, DRCLP) ........................................................ 7 - 36
7.3 Shift Instruction....................................................................................................................................... 7 - 38
7.3.1 n-bit shift to right or left of 16-bit data (SFR, SFRP, SFL, SFLP) ................................................... 7 - 38
7.3.2 1-bit shift to right or left of n-bit data (BSFR, BSFRP, BSFL, BSFLP) ........................................... 7 - 40
7.3.3 1-word shift to right or left of n-word data (DSFR, DSFRP, DSFL, DSFLP) .................................. 7 - 42
7.4 Bit Processing Instructions..................................................................................................................... 7 - 44
7.4.1 Bit set and reset for word devices (BSET, BSETP, BRST, BRSTP).............................................. 7 - 44
7.4.2 Bit tests (TEST, TESTP, DTEST, DTESTP) .................................................................................. 7 - 46
7.4.3 Batch reset of bit devices (BKRST, BKRSTP)................................................................................ 7 - 48
7.5 Data Processing Instructions ................................................................................................................. 7 - 50
7.5.1 16-bit and 32-bit data searches (SER, SERP, DSER, DSERP)..................................................... 7 - 50
7.5.2 16-bit and 32-bit data checks (SUM, SUMP, DSUM, DSUMP)...................................................... 7 - 54
7.5.3 Decoding from 8 to 256-bits (DECO, DECOP)............................................................................... 7 - 56
7.5.4 Encoding from 256 to 8-bits (ENCO, ENCOP) ............................................................................... 7 - 58
7.5.5 7-segment decode (SEG, SEGP) ................................................................................................... 7 - 60
7.5.6 4-bit groupings of 16-bit data (DIS, DISP)....................................................................................... 7 - 62
7.5.7 4-bit linking of 16-bit data (UNI, UNIP)............................................................................................ 7 - 64
7.5.8 Dissociation or linking of random data (NDIS, NDISP, NUNI, NUNIP) .......................................... 7 - 66
7.5.9 Data dissociation and linking in byte units (WTOB, WTOBP, BTOW, BTOWP)........................... 7 - 71
7.5.10 Maximum value search for 16 and 32-bit data (MAX, MAXP, DMAX, DMAXP).......................... 7 - 75
7.5.11 Minimum value search for 16 and 32-bits data (MIN, MINP, DMIN, DMINP).............................. 7 - 77
7.5.12 BIN 16 and 32-bits data sort operations (SORT, SORTP, DSORT, DSORTP) .......................... 7 - 80
7.5.13 Calculation of totals for 16-bit data (WSUM, WSUMP) ................................................................ 7 - 83
7.5.14 Calculation of totals for 32-bit data (DWSUM, DWSUMP)........................................................... 7 - 85
7.6 Structured Program Instructions ............................................................................................................ 7 - 87
7.6.1 FOR to NEXT instruction loop (FOR, NEXT).................................................................................. 7 - 87
7.6.2 Forced end of FOR to NEXT instruction loop (BREAK, BREAKP) ................................................ 7 - 89
7.6.3 Sub-routine program calls (CALL, CALLP)..................................................................................... 7 - 91
7.6.4 Return from sub-routine programs (RET)....................................................................................... 7 - 94
7.6.5 Sub-routine program output OFF calls (FCALL, FCALLP)............................................................. 7 - 95
7.6.6 Sub-routine calls between program files (ECALL, ECALLP).......................................................... 7 - 99
7.6.7 Sub-routine output OFF calls between program files (EFCALL, EFCALLP) ............................... 7 - 102
7.6.8 Refresh instruction (COM)............................................................................................................. 7 - 106
7.6.9 Index modification of entire ladder (IX, IXEND) ............................................................................ 7 - 112
7.6.10 Designation of modification values in index modification of entire ladders (IXDEV, IXSET)..... 7 - 120
7.7 Data Table Operation Instructions ....................................................................................................... 7 - 125
7.7.1 Writing data to the data table (FIFW, FIFWP) .............................................................................. 7 - 125
7.7.2 Reading oldest data from tables (FIFR, FIFRP) ........................................................................... 7 - 127
7.7.3 Reading newest data from data tables (FPOP, FPOPP) ............................................................. 7 - 129
7.7.4 Deleting and inserting data from and in data tables (FDEL, FDELP, FINS, FINSP) .................. 7 - 131
7.8 Buffer Memory Access Instruction ....................................................................................................... 7 - 134
7.8.1 Reading 1-/2-word data from the intelligent function module/special function module
(FROM, FROMP, DFRO, DFROP) ............................................................................................... 7 - 134
A - 7
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com
A - 7

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec qnacpuMelsec q modeMelsec q series

Table of Contents