L9_T2R: Table to Register
(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_T2R procedure copies the bit pattern of a 16-bit Boolean sequence in a table located in %M or %MW memory, depending on the respective procedure, to a destination word located in %MW memory. It can write the bit pattern of one 16-bit Boolean sequence per scan until the bit pattern of every 16-bit Boolean sequence in the source table has been written to the destination word.
The LENGTH value indicates the number of 16-bit Boolean sequences in the source table. The SOURCE parameter defines the location of the first bit in the 16-bit Boolean sequence that constitutes the table pointer. The pointer value indicates the number of 16-bit Boolean sequences in the source table that the operation has copied and written to the destination word, and points to the next 16-bit Boolean sequence the operation will copy and write. The 16-bit Boolean sequence that is contiguous to and follows the pointer is the first 16-bit Boolean sequence in the source table. The DEST parameter defines the location of the destination word.
The operation begins when the input to the ENABLE pin is turned ON. If both the HOLD and RESET inputs remain OFF during operation, the pointer will increment by a value of 1 after each scan, causing the operation to move to and write from the next adjacent 16-bit Boolean sequence within the source table.
The operation continues to copy source data to the destination word from the next contiguous 16-bit Boolean sequence until the operation reaches the end of the table, or until either of the following events occurs. If the HOLD input turns ON, the pointer stops incrementing and the operation continues to write from the same 16-bit Boolean sequence. If the RESET input turns ON, the pointer is reset to 0, and the operation moves to and writes from the first 16-bit Boolean sequence in the source table.
The OUT output turns ON upon the successful completion of the operation. The END output turns ON if the pointer value equals the LENGTH value, indicating the end of the table has been reached and no additional source data can be written from the table.
Representation
Parameters
Input Pin
Name
Data Type
Address Range
Meaning
Top
ENABLE
OFF to ON initiates the operation.
Middle
HOLD
BOOL
ON causes the pointer to cease incrementing after each move.
OFF permits the pointer to continue incrementing.
Bottom
RESET
BOOL
ON restores the pointer to its original value of 0.
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 table declared as an ARRAY[1..LENGTH*16] OF BOOL or as an ARRAY[1..LENGTH] OF UINT. LENGTH is the value of the LENGTH parameter. The result of LENGTH*16 is represented as a constant.
Middle
IN/OUT
DEST
ArrUInt2
%MW
The destination pointer followed by the destination address together in one array declared as ARRAY[1..2] OF UINT.
Bottom
IN
LENGTH
UINT
1...999
The number of 16-bit Boolean sequences included in the source table.
Valid range: 1 to 999.
Output Pin
Name
Data Type
Address Range
Meaning
Top
OUT
BOOL
ON indicates the operation succeeded.
Middle
END
BOOL
ON indicates the end of the source table has been reached and further writing form the source table is not possible.