Chapter 6 Applied Instructions Symbol S 1 : Data source 1 S 2 : Data source 2 Taking OR& and DOR& for example Explanation 6_ 1. This instruction compares the data in S 1 with that in S 2 . When the comparison result is not 0, the condition of the instruction is met. When the comparison result is 0, the condition of the instruction is not met. 2. Only the DOR # instruction can use the 32-bit counter. 3. Connect the OR # instruction and the contact in parallel. 4. &: Logical AND operation 5. |: Logical OR operation 6. ^:
Logical exclusive OR operation 6-253 API Instruction code Operand Function 0815- 0817 D OR# S , S 1 2 Contact type of logical operation OR# Device X Y M S T C HC D FR SM SR E K 16# “$” F S 1 S 2 BOOL WORD DWORD LWORD UINT INT DINT LINT REAL LREAL TMR CNT STRING Data type S 1 S 2 Pulse instruction 16-bit instruction 32-bit instruction - AS AS Comparison operation result API No. 16-bit instruction 32-bit instruction ON OFF 0815 OR& DOR& ≠ S &S 0 1 2 = S &S 0 1 2 0816 OR| DOR| ≠ S |S 0 1 2 = S |S 0 1 2 0817 OR^ DOR^ ≠ S ^S 0 1 2 = S ^S 0 1 2