AH500 Motion Control Module Manual S 1 : Source device 1; S 2 : Source device 2; D : Operation result A logical OR operator takes the binary representations in S 1 and S 2 , and performs the logical inclusive OR 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, the second bit is 1, or both bits are 1. Otherwise, the result is 0. Explanation Example 1 When X0.0 is ON, a logical OR operator takes the values in the 16-bit device D0 and the 16-bit device D2, and performs the logical inclusive OR operation on each pair of corresponding bits, and the operation result is stored in D4.
X0.0 WOR D4 Before the instruction is executed S 1 D0 b15 b0 S 2 D2 WOR After the instruction is executed D D4 When X0.1 is ON, a logical OR operator takes the values in the 32-bit device (D11, D10) and the 32-bit device (D21, D20), and performs the logical inclusive OR operation on each pair of corresponding bits, and the operation result is stored in (D41, D40).
Example 2 X0.1 Before the instruction is executed D11 D10 b15 b0 b31 S 1 1 S 2 DWOR D21 D20 0 After the instruction is executed D41 D40 D 1 5-46 API Instruction code Operand Function 27 D WOR P S , S , D 1 2 Logical OR 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) D0 D2 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 0 0 0 1 1 1 1 1 0 1 0 0 1 0 1 0 1 0 1 1 1 1 1 1 1 1 1 0 1 0 1 DWOR D10 D20 D40 1 1 1 1 1 1 1 1 0 0 0 0 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 1 1 1 1 1 1 1 1 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 1 1 1 1 1 1