Mitsubishi — Chapter 10 Application Instructions API 202-313

10 Application Instructions API 202-313 API 221~ 223 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 . If the result is not “0”, the continuity of the instruction is enabled. If the result is “0”, the continuity of the instruction is disabled. 3. OR# is an operation instruction used on parallel contacts. 4. &: Logical “AND” operation 5. |: Logical “OR” operation 6. ^: Logical “XOR” operation 7. When 32-bit counters (C200 ~ C255) are used in this instruction for comparison, make sure to adopt 32-bit instruction (DOR#).

If 16-bit instructions (OR#) is adopted, a “program error” will occur and the ERROR indicator on the MPU panel will flash. Program Example: 1. When X1 = On and the result of logical AND operation of C0 and C10 ≠ 0, Y10 = On. 2. M60 will be On when X2 = On and M30 = On, or the result of logical OR operation of 32-bit register D10 (D11) and 32-bit register D20 (D21) ≠ 0, or the result of logical XOR operation of 32-bit register D200 (D201) and 32-bit counter C235 ≠ 0. DVP-PLC Application Manual 10-17 Mnemonic Operands Function D OR# Contact Logical operation OR# Type OP Bit Devices Word Devices Program Steps X Y M S K H KnX KnY KnM KnS T C D E F OR#: 5 steps DOR#:

9 steps S 1 * * * * * * * * * * * S 2 * * * * * * * * * * * PULSE 16-bit 32-bit ES EX SS SA SX SC EH SV EH3 SV2 ES EX SS EH3 ES EX SS EH3 SA S X SC EH SV SA SX SC EH SV SV2 SV2 16 -bit 32 -bit Continuity No-continuity API No. instruction instruction condition condition 221 OR& DOR& S & S ≠ 0 1 2 S & S = 0 1 2 222 OR| DOR| S | S ≠ 0 1 2 S | S = 0 1 2 223 OR^ DOR^ S ^ S ≠ 0 1 2 S ^ S = 0 1 2 X1 Y0 OR & C0 C10 X2 M30 M60 DORI D10 D20 DOR ^ D100 D200 DOR ^ D100 D200 OR & C0 C10 DORI D10 D20