L9_T2T: Table to Table
(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_T2T procedure copies the bit pattern of a 16-bit Boolean sequence from a source table located in %M or %MW memory, depending on the respective procedure, to a word occupying the same relative position in a destination table 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 a word occupying the same relative position in the destination table.
The LENGTH value indicates both the number of 16-bit Boolean sequences in the source table and the number of words in the destination table. The SOURCE parameter defines the location of the first 16-bit Boolean sequence in the source table.
The DEST parameter defines the location of the destination table’s pointer. This word points into both the source and destination tables, indicating where the data will be copied from and to in the current scan. The word contiguous to and following the pointer is the first word in the destination table.
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 copy data from the next adjacent 16-bit Boolean sequence in the source table and write to the next adjacent word within the destination table.
The operation continues to copy data from the source table to the destination table until the operation reaches the end of the both tables, 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 in the source table to the same word in the destination table. 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 to the first word in the destination 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 both tables has been reached and no additional source data can be written to the destination table.
Representation
Parameters
Input Pin
Name
Data Type
Address Range
Meaning
Top
ENABLE
OFF to ON initiates the operation.
Middle
HOLD
BOOL
ON = hold pointer value
OFF= increment pointer value
Bottom
RESET
BOOL
ON= reset pointer to zero
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
ANY_ARRAY_UINT
%MW
The common pointer for source and destination followed by the destination word array declared as ARRAY[1..(1+LENGTH)] OF UINT.
Bottom
IN
LENGTH
UINT
1...999
The number of 16-bit Boolean sequences in the source table, and the number of words in the destination 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.