L9_SENS: Sense
(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_SENS procedure senses and reports the state - ON or OFF - of a single Boolean within a data matrix.
The data matrix consists of 1 or more 16-bit sequences in %M or %MW memory, depending on the respective procedure. The LENGTH value determines the number of 16-bit sequences included in the operation. The SOURCE pin value, combined with the BITLOC pin value, identifies the specific Boolean to examine.
The operation begins when the input to the ENABLE pin is turned ON. If the INCPTR bit is ON - and the BITLOC pin is tied to a variable - the BITLOC value will increment by 1 upon completion of the current scan. If the RESET pin is turned ON, the BITLOC value is reset to 1.
The OUT output turns ON upon the successful completion of the operation. The BITSENS output reports the state of the Boolean being sensed: 1 = ON, 0 = OFF. The ERR output turns ON if the BITLOC value exceeds the size of the data matrix defined by the LENGTH value.
Representation
Parameters
Input Pin
Name
Data Type
Address Range
Meaning
Top
ENABLE
OFF to ON initiates the operation.
Middle
INCPTR
BOOL
ON = increment BITLOC by 1 (only if BITLOC = %MW; not possible if BITLOC = %IW or constant value.
OFF = do not increment BITLOC.
Bottom
RESET
BOOL
ON = resets BITLOC to 1; OFF = does not reset BITLOC.
Node
Node Type
Name
Data Type
Address Range
Meaning
Top
IN/OUT
BITLOC
%IW, %MW
bit location in data matrix to be sensed
Can be a constant value, %MW, %IW or an unlocated variable.
Valid range: 1 to 9,600
NOTE: Employs LL984 bit addressing: 1-based starting at the left end of 16-bit sequences.
NOTE: If BITOC is 0 the ERR output is not set to 1.
Middle
IN
DATA
ANY_ARRAY_UINT or ANY_ARRAY_EBOOL
%M, %I, %IW, %MW
data matrix with bit to be sensed
Bottom
IN
LENGTH
UINT
1...600
length of data matrix (number of 16 bit sequences)
Valid range: 1 to 600.
Output Pin
Name
Data Type
Address Range
Meaning
Top
OUT
BOOL
ON indicates the operation succeeded. (Echoes the status of the ENABLE input).
Middle
BITSENS
BOOL
Reports the value of the sensed bit. ON  = 1, OFF = 0.
Bottom
ERR
BOOL
Indicates the BITLOC value exceeds the data matrix address range.
NOTE: If BITLOC is 0, the ERR output is not set to 1.