GE PACSystems RX7i Cpu Programmer's Reference Manual page 203

Hide thumbs Also See for PACSystems RX7i:
Table of Contents

Advertisement

Chapter 4. Ladder Diagram (LD) Programming
4.9.10
Table Write
The Table Write (TBL_WRT) function sequentially updates values in a
table that never becomes full. When the pointer (PTR) reaches the end
of the table, it automatically returns to the beginning of the table.
1. TBL_WRT increments the pointer by one.
2. TBL_WRT copies data from input parameter IN to the position in the table indicated by the
pointer. (It writes over any value currently at that location.) Additional program logic must then
be used to place the data in the input reference.
3. Steps 1 and 2 are repeated each time the instruction is executed, until the table is full (PTR=LEN).
When the table is full, the pointer wraps around to the beginning of the table.
Note: The TBL_WRT and TBL_RD functions can operate on the same or different tables. By
specifying a different reference for the pointer, these functions can access the same data
table at different locations or at different rates.
When TBL_WRT receives power flow, the pointer (PTR) increments by 1. If this new pointer location
is the last item in the table, the output FL is set to ON. The next time TBL_WRT executes, PTR is
automatically set back to 1. After incrementing PTR, TBL_WRT writes the content of the input
reference to the current pointer location, overwriting data already stored there.
TBL_WRT always passes power to the right when it receives power.
Note: TBL_WRT is like FIFO_WRT with a wrap-around.
Operands
Note: For each mnemonic, use the corresponding data type for the TB and IN operands. For
example, TBL_WRT_DINT requires TB and IN to be DINT variables.
Parameter
Description
Length
1  Length  32,767.
TB (must be the
The elements in the table
same data type as IN)
PTR
Pointer. Index of the next
element.
IN (must be the same
The element to write to the table All. %S - %SC allowed only for WORD,
data type as TB)
FL
Energized when IN is written to
the last element of the table
Table Write Example
WIDGETS is a table with 20 integer elements. When the enabling
input %I00012 is ON, the pointer increments and the contents of
%P00077 are written into the table at the pointer location. %L00001
functions as the pointer into the data table.
188
PACSystems* RX7i, RX3i and RSTi-EP CPU Programmer's Reference Manual
Allowed Operands
Constants
All except S, constants, data flow. SA – SC
allowed only for WORD, DWORD
All except constants, data flow, %S - %SC No
DWORD
Power flow
Mnemonics:
TBL_WRT_DINT
TBL_WRT_DWORD
TBL_WRT_INT
TBL_WRT_UINT
TBL_WRT_WORD
Optional
No
No
No
No
GFK-2950C

Advertisement

Table of Contents
loading

This manual is also suitable for:

Pacsystems rx3iPacsystems rsti-ep

Table of Contents