L9_AND: Logical AND
(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_AND procedure performs a Boolean AND operation on the bit patterns of a source matrix and a destination matrix, then writes the resulting ANDed bit pattern into the destination matrix overwriting its previous contents.
NOTE: The L9_AND 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 AND 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 AND 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 both the source and destination bits have the value of 1, a 1 is written to the destination bit; in all other cases, a 0 is written to the destination bit. L9_AND 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_AND 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 EBOOL, 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 EBOOL, can be located or unlocated.
Bottom
IN
LENGTH
UINT
1...100
The number of 16-bit Boolean sequences to be included in the Boolean AND operation.
Valid range: 1 to 100.
Output Pin
Name
Data Type
Address Range
Meaning
Top
OUT
BOOL
ON indicates the Boolean AND operation succeeded. (Echoes the status of the ENABLE input).