DVP-ES3 Series Programming Manual Example Suppose SM617 is ON. When M0 is ON, the instruction counts the bits with the value one, and stores the operation result in D20. Suppose SM617 is OFF. When M0 is ON, the instruction counts the bits with the value zero, and stores the operation result in D20. b0 b15 D0 12 0 SM 617 D20 D1 D2 36 1 SM 617 D20 Additional remarks 1. If S + n -1 exceeds the device range, the instruction is not executed, SM0 is ON, and the error code in SR0 is 16#2003. _6 2. If n is not between 1 – 256, the instruction is not executed, SM0 is ON, and the error code in SR0 is 16#200B. 3. Instruction flags: SM617: The bits with the value zero or one are counted. SM618:
ON when the matrix counting result is 0. 6-376 1 1 1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 1 1