Detailed description
Original instructions
Mode of Operation
R2T_*** copies the value entered at SRC to the DEST parameter which is interpreted as a table.
The OFF parameter, an offset, points to the position in the destination field (array) where the source value is to be saved.
In each cycle, the function copies the value from SRC to DEST[OFF] and increments the offset value by the size of the data type in the table, i.e. OFF+1.
The offset value is automatically raised in each cycle as long as the NOINC parameter does not have the value 1. OFF is of the read/write type, equivalent to the VAR_IN_OUT IEC parameters
Association between OFF, NOINC and R:
OFF
(previous cycle)
NOINC
R
OFF
(current cycle)
Comment
n (any value)
0
1
2
The value for OFF is reset to 1 with R=1, and since NOINC=0, incremented by 1 already in the same cycle.
n (any value)
1
1
1
The value for OFF is reset to 1 with R=1, and is not incremented since NOINC=1.
n (any value)
1
0
n
If NOINC=1, the value for OFF is not incremented and the value from the previous cycle is maintained.
n (any value)
0
0
n+1
If R=0 and NOINC=0, the value from the previous cycle is incremented by 1.
DEST is type ANY which implicates a pre-defined length. The same type is accepted as the data type for this array as for SRC irrespective of the type entered for the run time (it could be a structure of various types).
OFF undergoes a boundary check in each cycle. If OFF exceeds the length of the table (internal parameter size), END is set to 1 and OFF is no longer increased (the function no longer copies until OFF accepts a value within the table’s boundaries again.