3. Instruction Set Operands: S 1 : Source data device 1 S 2 : Source data device 2 D : Operation result Explanations: 1. This instruction conducts logical OR operation of S 1 and S 2 in 16-bit mode and stores the result in D . 2. For 32-bit operation please refer to DOR instruction. Program Example: When X0 = ON, the 16-bit data source D0 and D2 are analyzed and the result of the logical OR is stored in D4.
X0 b15 b00 Before execution D0 D2 0 0 0 0 0 0 1 1 1 1 0 1 1 1 0 1 WOR After execution D4 3-85 API Mnemonic Operands Function Controllers SA2 ES2/EX2 SS2 SX2 SE Controllers 27 WOR P L ogical Word OR ES2/EX2 SS2 SA2 SX2 SE Type OP Bit Devices Word devices Program Steps X Y M S K H KnX KnY KnM KnS T C D E F WOR, WORP: 7 steps S 1 * * * * * * * * * * * S 2 * * * * * * * * * * * D * * * * * * * * PULSE 16-bit 32-bit SA2 SX2 SS2 SA2 SX2 ES2/EX2 SS2 SA2 SE SX2 ES2/EX2 SS2 ES2/EX2 SE SE WOR D0 D2 D4 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 1 1 1 1 1 1 1 1 0 1 0 1