10 Application Instructions API 202-313 API 232~ 238 Operands: S 1 : Data source device 1 S 2 : Data source device 2 Explanations: 1. See the specifications of each model for the range of operands. 2. This instruction compares the content in S 1 and S 2 . Take API232 (AND=) for example, if the result is “=”, the continuity of the instruction is enabled. If the result is “≠”, the continuity of the instruction is disabled. 3. AND ※ is a comparison instruction is used on series contacts. 4. When 32-bit counters (C200 ~ C255) are used in this instruction for comparison, make sure to adopt 32-bit instruction (DAND ※ ).
If 16-bit instructions (AND ※ ) is adopted, a “program error” will occur and the ERROR indicator on the MPU panel will flash. Program Example: 1. When X0 = On and the content in C10 = K200, Y10 = On. 2. When X1 = Off and the content in D0 ≠ K-10, Y11= On will be retained. 3. When X2 = On and the content in 32-bit register D0 (D11) X0 X1 SET Y11 M50 X2 M3 DVP-PLC Application Manual 10-19 Mnemonic Operands Function D AND※ AND Compare Type OP Bit Devices Word Devices Program Steps X Y M S K H KnX KnY KnM KnS T C D E F AND※: 5 steps DAND※:
9 steps S 1 * * * * * * * * * * * S 2 * * * * * * * * * * * PULSE 16-bit 32-bit ES EX SS SA SX SC EH SV EH3 SV2 EH3 EH3 ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV SV2 SV2 16 –bit 32 –bit Continuity No-continuity API No. instruction instruction condition condition 232 AND = DAND = S = S 1 2 S ≠ S 1 2 233 AND > DAND > S > S 1 2 S ≤ S 1 2 234 AND DAND S S ≥ S 1 2 236 AND DAND S ≠ S 1 2 S = S 1 2 237 AND DAND S ≤ S 1 2 S > S 1 2 238 AND > = DAND > = S ≥ S 1 2 S 0 AND= K200 C10 Y10 AND K-10 D0 DAND> K678493 D10