GE PACSystems RX7i Cpu Programmer's Reference Manual page 202

Hide thumbs Also See for PACSystems RX7i:
Table of Contents

Advertisement

4.9.9
Table Read
The Table Read (TBL_RD) function sequentially reads values in a table.
When the pointer reaches the end of the table, it wraps around to the
beginning of the table. (TBL_RD is like FIFO_RD with a wrap-around.)
When TBL_RD receives power flow:
1. TBL_RD increments the pointer by one.
2. TBL_RD copies data indicated by the pointer to output parameter Q. Additional program logic
must then be used to capture the data from the output reference.
3. Steps 1 and 2 are repeated each time the instruction is executed, until the end of the table is
reached (PTR=the length specified in Length). When the end of the table is reached, the pointer
wraps around to the beginning of the table.
When TBL_RD receives power flow, the pointer (PTR) increments by one. If this new pointer location
is the last item in the table, the output EM is set ON. The next time TBL_RD executes, PTR is
automatically set back to 1. After PTR is incremented, the content at the new pointer location is
copied to output Q.
TBL_RD always passes power to the right when it receives power.
Note: The TBL_RD and TBL_WRT 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.
Operands
Note: For each mnemonic, use the corresponding data type for the TB and Q operands. For
example, TBL_RD_DINT requires TB and Q to be DINT variables.
Parameter
Description
1  Length  32,767
Length
TB (must be the same
The elements in the table
type as Q)
PTR
Pointer. Index of the next
element.
EM
Energized when the last element
of the table is read
Q (must be the same
The element read from the table
type as TB)
Table Read Example
WIDGETS is a table with 20 integer elements. When the
enabling input %M00346 is ON, the pointer increments and
the contents of the next element of the table are copied
into ITEM_CT. %L00001 functions as the pointer into the
data table. %M01001 is used to signal when all items of
the data table have been accessed.
GFK-2950C
Chapter 4. Ladder Diagram (LD) Programming
Allowed Operands
Constants
All except constants
All except data flow, S - SC, constants
Power flow
All except constants, S. SA, SB, SC
allowed only for WORD, DWORD
February 2018
Mnemonics:
TBL_RD_DINT
TBL_RD_DWORD
TBL_RD_INT
TBL_RD_UINT
TBL_RD_WORD
Optional
No
No
No
No
No
187

Advertisement

Table of Contents
loading

This manual is also suitable for:

Pacsystems rx3iPacsystems rsti-ep

Table of Contents