Mitsubishi — 5.6 Descriptions of the Applied Instructions

Chapter 5 Applied Instructions  S 1 : Source device 1; S 2 : Source device 2; D : Operation result  A logical AND operator takes the binary representations in S 1 and S 2 , and performs the logical AND operation on each pair of corresponding bits. The operation result is stored in D .  The result in each position is 1 if the first bit is 1 and the second bit is 1. Otherwise, the result is 0. Explanation Example 1  When X0.0 is ON, a logical AND operator takes the values in the 16-bit device D0 and the 16-bit device D2, and performs the logical AND operation on each pair of corresponding bits, and the operation result is stored in Y4.

X0.0 b15 b0 Before the instruction is executed S 1 D0 S 2 D2 WAND D4 After the instruction is executed  When X0.1 is ON, a logical AND operator takes the values in the 32-bit device (D11, D10) and the 32-bit device (D21, D20), and performs the logical AND operation on each pair of corresponding bits, and the operation result is stored in (D41, D40).

D Example 2 D40 b15 b0 b31 S 1 Before the instruction is executed D11 D10 S 2 D21 D20 DWAND 0 After the instruction is executed D41 D40 D 0 5-45 API Instruction code Operand Function 26 D WAND P S , S , D 1 2 Logical AND operation Device Xn.n Yn.n M S K 16# F KnM KnS D W T C V Z S 1           S 2           D         Pulse instruction 16-bit instruction (7 steps) 32-bit instruction (9 steps)    WAND D0 D2 D4 1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 1 0 0 X0 .1 DWAND D10 D20 1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 1 0 0 0 0 1 0 0 1 0 0 0 0 0 0 1 0 0