Chapter 5 Applied Instructions Explanation S 1 : Minimum value; S 2 : Maximum value; S : Comparison value; D : Comparison result The instruction is used to compare the value in S with that in S 1 , and compare the value in S with that in S 2 . The comparison result is stored in D . The value in S 2 must be greater than that in S 1 . The operand D occupies three consecutive devices. If the operand D is M0, M0, M1, and M2 will be occupied automatically. When X0.0 is ON, the instruction ZCP is executed, and M0, M1, or M2 is ON. When X0.0 is OFF, the execution of the instruction ZCP stops, and the states of M0, M1, and M2 remain unchanged .
Example X0.0 > >>>> 5-29 API Instruction code Operand Function 11 D ZCP P S , S , S, D 1 2 Zonal comparison Device Xn.n Yn.n M S K 16# F KnM KnS D W T C V Z S 1 S 2 S D Pulse instruction 16-bit instruction (9 steps) 3 2-bit instruction (12 steps) .0 ZCP K10 K100 C10 M0