AH500 Motion Control Module Manual Explanation S 1 : Initial device involved in a comparison; S 2 : Value which is compared; D : Initial device in which a comparison result is stored (5 consecutive devices are occupied.); n : Number of values S 1 is the initial register involved in a comparison, and n is the number of values which are compared. The values in the n registers starting from S 1 are compared with the value in S 2 , and the comparison results are stored in the five registers starting from D . If the 32-bit instruction is used, S 1, S 2 , D , and n will be 32-bit registers. 16-bit instruction:
n =1~256; n =1~128 (32-bit instruction) 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 K4S16 (decimal numeral system). Example When X0.0 is ON, the values in D10~D19 are compared with the value in D0, and the comparison results are stored in D50~D54. If none of the values in D10~D19 are equal to the value in D0, the values in D50~D52 will be 0. A comparison is based on algebra (-10 < 2). The number of the minimum value is stored in D53, and the number of the maximum value is stored in D54.
If there is more than one minimum value/maximum value, the number which is the biggest will be stored. X0.0 5-72 API Instruction code Operand Function 61 D SER P S , S , D, n 1 2 Searching data Device Xn.n Yn.n M S K 16# F KnM KnS D W T C V Z S 1 S 2 D n Pulse instruction 16-bit instruction (9 steps) 32-bit instruction (11 steps ) SER D10 D0 D50 K10