DVP-ES3 Series Programming Manual Symbol S : Source device D : Destination device Explanation _6 1. This instruction finds the number of bits in S whose values are ON and stores the number of ON bits in D . 2. When the values of all the bits in the source device specified by S are 0, the zero flag SM600 is ON. 3. Only the 32-bit instructions can use the 32-bit counter, but not the device E. Example When M0 is ON, the instruction stores the number of bits whose values are one in D0 in D2. b0 b15 D0 D2 3 Additional remarks If the device exceeds the range, the instruction is not executed, SM0 is ON, and the error code in SR0 is 16#2003.
6-346 API Instruction code Operand Function 1201 D SUM P S, D Finding the number of bits whose states are ON Device X Y M S T C HC D FR SM SR E K 16# “$” F S D BOOL WORD DWORD LWORD UINT INT DINT LINT REAL LREAL TMR CNT STRING Data type S D Pulse instruction 16-bit instruction 32-bit instruction ES3 ES3 ES3 0 0 0 1 0 0 1 0 0 0 0 0 0 1 0 0