L9_XOR: Exclusive OR
(Original Document)
Naming
Name in LL984 Editor
Function Block Name
name of legacy 984 instruction
name in other tools and editors like:
  • Type Library Browser
  • Data Editor
  • Animation Tables
  • Search Results
Function Description
The L9_XOR procedure performs a Boolean exclusive OR operation on the bit patterns of a source matrix and a destination matrix, then writes the resulting XORed bit pattern into the destination matrix overwriting its previous contents.
NOTE: The L9_XOR procedure will not write to and change the state of any BOOL that has been forced in the Control Expert Animation Table.
Both the source and destination matrices consist of 16-bit sequences of outputs located in %M or %MW memory, depending on the respective procedure. The LENGTH value determines the number of 16-bit sequences included in the Boolean XOR operation. The location of the source matrix is defined by the SOURCE parameter, and the location of the destination matrix is defined by the DEST parameter.
The Boolean XOR operation begins when the input to the ENABLE pin is turned ON. Each bit in the source matrix is compared to the corresponding bit in the destination matrix. If the source and destination bits have different values, a 1 is written to the destination bit. If the source and destination bits have the same value, a 0 is written to the destination bit. L9_XOR can activate a single output. The OUT output turns ON upon the successful completion of the operation.
NOTE: If you want to retain the original destination bit pattern, copy the information into another table using the L9_BLKM block, before performing the L9_XOR operation.
Representation
Parameters
Input Pin
Name
Data Type
Address Range
Meaning
Top
ENABLE
OFF to ON initiates the operation.
Node
Node Type
Name
Data Type
Address Range
Meaning
Top
IN
SOURCE
ANY_ARRAY_UINT or ANY_ARRAY_EBOOL
%M, %I, %IW, %MW
The source matrix as an ARRAY OF UINT or BOOL, can be located or unlocated.
Middle
IN/OUT
DEST
ANY_ARRAY_UINT or ANY_ARRAY_EBOOL
%M, %MW
The destination matrix as an ARRAY OF UINT or BOOL, can be located or unlocated.
Bottom
IN
LENGTH
UINT
1...100
The number of 16-bit Boolean sequences to be included in the Boolean XOR operation.
Valid range: 1 to 100.
Output Pin
Name
Data Type
Address Range
Meaning
Top
OUT
BOOL
ON indicates the Boolean XOR operation succeeded. (Echoes the status of the ENABLE input).