Appendix D Use of Application Instructions | DOP-EXIO Series Operands: S 1 : Lower bound of zone comparison S 2 : Upper bound of zone comparison S : Comparison value D : Comparison result Explanations: 1. S is compared with its S 1 , S 2 and the result is stored in D . 2. When S 1 > S 2 , the instruction performs comparison by using S 1 as the lower/upper bound. 3. The two comparison values are compared algebraically and the two values are signed binary values. When b15 = 1 in 16-bit instruction or b31 = 1 in 32-bit instruction, the comparison will regard the value as negative binary values. Program Example: 1. Designate device M0, and operand D automatically occupies M0, M1 and M2. 2.
When X0 = On, ZCP instruction will be executed and one of M0, M1, and M2 will be On. When X0 = Off, ZCP instruction will not be executed and M0, M1, and M2 remain their status before X0 = Off. X0 X0 3. To clear the comparison result, use RST or ZRST instruction. D-16 Revision March, 2008, Doc. Name: 2007PDD23000014 Mnemonic Operands Function ZCP S1 S2 S D Zone Compare Bit Devices Word Devices 16-bit instruction (9 Steps) Continuous ZCP execution 32-bit instruction (17 Steps) Continuous DZCP execution y Flags: None X Y M S K H KnX KnY KnM KnS T C D E F S 1 ¼ ¼ ¼ ¼ ¼ ¼ ¼ ¼ ¼ ¼ ¼ S 2 ¼ ¼ ¼ ¼ ¼ ¼ ¼ ¼ ¼ ¼ ¼ S ¼ ¼ ¼ ¼ ¼ ¼ ¼ ¼ ¼ ¼ ¼ D ¼ ¼ ¼ y Note: 1.
If S , S and S are used in device F, only 16-bit instruction is 1 2 applicable. 2. The content in S should be smaller than the content in S . 1 2 3. Operand D occupies 3 consecutive devices. ZCP K10 K100 C10 M0