Chapter 6 Applied Instructions Symbol S 1 : Data source 1 S 2 : Data source 2 D : Operation result 6_ Explanation 1. This instruction applies the logical operator OR to the binary representations in S 1 and S 2 . It performs the logical inclusive operation OR on each pair of corresponding bits, and stores the operation result in D . 2. Only the DOR instruction can use the 32-bit counter but not the device E. 3. 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.
Example 1 When X0.0 is ON, This instruction performs the logical inclusive operation OR on each pair of corresponding bits in the 16-bit device Y0 and the 16-bit device Y2. It stores the operation result in Y4. 6-239 API Instruction code Operand Function 0802 D WOR P S , S , D 1 2 Logical OR operation Device X Y M S T C HC D FR SM SR E K 16# “$” F S 1 S 2 D BOOL WORD DWORD LWORD UINT INT DINT LINT REAL LREAL TMR CNT STRING Data type S 1 S 2 D Pulse instruction 16-bit instruction 32-bit instruction AS AS AS