AH500 Programming Manual API 1201 Symbol: S : Source device Word/Double word D : Destination device Word/Double word Explanation: 1. The number of bits whose values are 1 in S is stored in D . 2. When the values of 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. Example: When X0.0 is ON, the number of bits whose values are 1 in D0 is stored in D2. b0 b15 3 D0 D2 Additional remark: If the device exceeds the range, the instruction is not executed, SM0 is ON, and the error code in SR0 is 16#2003.
6-264 Instruction code Operand Function D SUM P S, D Number of bits whose states are ON Device X Y M S T C HC D L SM SR E PR K 16# “$” DF S D Pulse instruction 16-bit instruction (5 steps) 32-bit instruction (5 steps) AH500 AH500 AH500 0 0 0 1 0 0 1 0 0 0 0 0 0 1 0 0