Delta Electronics — 6.9.2 Explanation of Logic Instructions

Chapter 6 Applied Instructions Symbol S 1 : Matrix source 1 S 2 : Matrix source 2 D : Operation result n : Length of the array 6_ Explanation 1. This instruction applies the logical operator XOR to the n rows of binary representations in S 1 and the n rows of stores the operation result in D . binary representations in of S 2 . It performs the matrix exclusive operation OR on each pair of corresponding bits and 2. The result in each position is 1 if the two bits are different, and 0 if they are the same. 3. The operand n must be between 1–256.

Example When X0.0 is ON, the instruction performs the matrix exclusive operation OR on each pair of corresponding bits in the 16-bit devices Y0–Y2 and the data in 16-bit devices Y10–Y12. It stores the operation result in the 16-bit devices Y20–Y22. 6-245 API Instruction code Operand Function 0805 MXOR P S , S , D, n 1 2 Matrix exclusive OR operation Device X Y M S T C HC D FR SM SR E K 16# “$” F S 1       S 2       D     n         BOOL WORD DWORD LWORD UINT INT DINT LINT REAL LREAL TMR CNT STRING Data type S 1    S 2    D    n    Pulse instruction 16-bit instruction 32-bit instruction AS AS -