Delta Electronics — 6.13.2 Explanation of Data Processing Instructions

Chapter 6 Applied Instructions Symbol S : Matrix source n : Length of the array D : Operation result Explanation 1. This instruction counts the bits with the value one or zero in the n devices starting from the device specified by S . 6_ The instruction stores the operation result in D . 2. When SM617 is ON, the instruction counts the bits with the value one. When SM617 is OFF, the instruction counts the bits with the value 0. When the operation result is 0, SM618 is ON. 3. The value in n must be between 1 – 256. Example Suppose SM617 is ON. When X0.0 is ON, the instruction counts the bits with the value one, and stores the operation result in D20. Suppose SM617 is OFF.

When X0.0 is ON, the instruction counts the bits with the value zero, and stores the operation result in D20. 6-369 API Instruction code Operand Function 1214 MBC P S, n, D Counting the bits with the value zero or one Device X Y M S T C HC D FR SM SR E K 16# “$” F S     n          D      BOOL WORD DWORD LWORD UINT INT DINT LINT REAL LREAL TMR CNT STRING Data type S    n    D    Pulse instruction 16-bit instruction 32-bit instruction AS AS -