Mitsubishi — 5.6 Descriptions of the Applied Instructions

Chapter 5 Applied Instructions  S 1 : Source device 1; S 2 : Source device 2  The instruction is used to compare the value in S 1 with that in S 2 . If the comparison result is not 0, the condition of the instruction is met. If the comparison result is 0, the condition of the instruction is not met.  The instruction OR# is connected to a contact in parallel. Explanation  &: Logical AND operation  |: Logical OR operation  ^: Logical exclusive OR operation  If a 32-bit counter is used, the 32-bit instruction DOR# must be used. If a 32-bit counter and the 16-bit instruction OR# are used, a program error will occur, and the ERROR LED indicator on the motion control module will blink.

(C200~C255 are 32-bit counters.)  When X0.1 is ON, Y0.0 is ON. Besides, when a logical AND operator performs the logical AND operation on each pair of corresponding bits in C0 and C10, and the operation result is not 0, Y0.0 is ON.  When X0.2 and M30 are ON, M60 is ON. When a logical OR operator performs the logical OR operation on each pair of corresponding bits in the 32-bit register (D11, D10) and the 32-bit register (D21, D20), and the operation result is not 0, M60 is ON.

Besides, when the logical XOR operator performs the logical exclusive OR operation on each pair of corresponding bits in the 32-bit counter C2350 and the 32-bit register (D201, D200), and the operation result is not 0, M60 is ON. Example 5-111 API Instruction code Operand Function 221~223 D OR# S , S 1 2 Logical operation Device Xn.n Yn.n M S K 16# F KnM KnS D W T C V Z S 1           S 2           Pulse instruction 16-bit instruction (5 steps) 32-bit instruction ( 7 steps) –   API No.

16-bit 32-bit ON OFF instruction instruction 221 OR& DOR& S 1 & S 2 ≠0 S 1 & S 2 = 0 222 OR| DOR| S 1 | S 2 ≠0 S 1 | S 2 = 0 223 OR^ DOR^ S 1 ^ S 2 ≠0 S 1 ^ S 2 = 0 X0.1 Y0.0 OR & C0 C10 X0.2 M30 M60 DORI D10 D20 DOR ^ C235 D200 DOR ^ C235 D200 OR & C0 DORI D10