5 Categories and Use of Basic Application Instructions Operands: S 1 : Data source device 1 S 2 : Data source device 2 Explanations: 1. See the specifications of DVP-PM for its range of use. 2. #: &, |, ^ 3. AND# instruction compares the content in S 1 and S 2 . If the result is not “0”, the instruction will be ON. If the result 4. AND# is series connected to contacts: is “0”, instruction will be OFF. 5. &: Logical ‘AND’ operation 6. |: Logical ‘OR’ operatioin 7. ^: Logical ‘XOR’ operation 8. When 32-bit counters (C200 ~ C255) are used in this instruction for operation, please adopt 32-bit instruction (DAND#).
If 16-bit instruction (AND#) is adopted, “program error” will occur, and the ERROR LED indicator on the panel of DVP-PM will flash. Program Example: 1. When the result of logical AND operation of C0 and C10 ≠ 0, Y10 will be ON. 2. When the result of logical OR operation of D10 and D0 ≠ 0 and X1 = OFF, Y11 will be ON and held. 3. When X2 = ON and the result of logical XOR operation of 32-bit register D200 (D201) and 32-bit register D100 (D101) ≠ 0 or M3 = ON, M50 will be ON.
Y10 X0 X1 X2 M50 M3 DVP-PM Application Manual 5-127 API Mnemonic Operands Function Contact Logical Operation AND# Controllers 20PM 10PM 218~ 220 D AND# Type OP Bit Devices Word Devices Program Steps X Y M S K H KnX KnY KnM KnS T C D V Z AND#: 5 steps DAND#: 7 steps S 1 * * * * * * * * * * * D S 2 * * * * * * * * * * * 16-bit 32-bit instruction API No. “ON" condition “OFF” condition instruction 218 AND& DAND& S & S ≠0 1 2 S & S = 0 1 2 219 AND| DAND| S | S ≠0 1 2 S | S = 0 1 2 220 AND^ DAND^ S ^ S ≠0 1 2 S ^ S = 0 1 2 AND& C0 C10 AND I D10 D0 SET Y11 DAND^ D200 D100