Mitsubishi — 5.6 Descriptions of the Applied Instructions

AH500 Motion Control Module Manual  S : Source device; D : Destination device  The number of bits which are 1 in S is stored in D .  If the bits in S are 0, a zero flag will be ON.  If the 32-bit instruction is used, D will occupy two registers.  If KnM/KnS is used, it is suggested that M device numbers/S device numbers should start from a number which is a multiple of 16 in the decimal numeral system, e.g. K1M0 and K4M16 (decimal numeral system).  SM1064 is the zero flag in an Ox motion subroutine, and SM968 is the zero flag in O100. Explanation  When X2.0 is ON, the number of bits which are 1 in D0 is stored in D2.

Example X2.0 SUM 3 D2 D0 5-64 API Instruction code Operand Function 43 D SUM P S,D Number of bits which are ON Device Xn.n Yn.n M S K 16# F KnM KnS D W T C V Z S         D       Pulse instruction 16-bit instruction (5 steps) 32-bit instruction (5 steps )    D0 D2 0 0 0 1 0 0 1 0 0 0 0 0 0 1 0 0