Fifo Write - GE PACSystems RX7i Cpu Programmer's Reference Manual

Hide thumbs Also See for PACSystems RX7i:
Table of Contents

Advertisement

Chapter 4. Ladder Diagram (LD) Programming
4.9.4

FIFO Write

The First-In-First-Out (FIFO) Write (FIFO_WRT) function moves data
into tables. The function increments the table pointer by one and
adds an entry at the new pointer location in a FIFO table. Values are
always moved in at the bottom of the table. If the pointer reaches
the last location and the table becomes full, FIFO_WRT can add no
further values. The FIFO_RD function must then be used to remove
the entry at the pointer location and decrement the pointer by one.
1. FIFO_WRT increments the pointer by one.
2. FIFO_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 FIFO_WRT is executed, until the table is full (PTR=0).
The pointer does not wrap around when the table is full.
When FIFO_WRT receives power flow, the pointer is incremented by 1. Then, input data is written
into the table at the pointer location. If the pointer was already at the last location in the table, no
data is written and FIFO_WRT does not pass power to the right. The pointer always indicates the last
item entered into the table. If the table becomes full, it is not possible to add more entries to it.
FIFO_WRT passes power to the right after a successful execution (PTR < LEN).
Operands for FIFO Write
Note: For each mnemonic, use the corresponding data type for the TB and IN operands. For
example, FIFO_WRT_DINT requires TB and IN to be DINT variables.
Parameter
Length (??)
TB (must be the same data
type as IN)
PTR
IN (must be the same data
type as TB)
FL
180
PACSystems* RX7i, RX3i and RSTi-EP CPU Programmer's Reference Manual
Description
1  Length  32,767.
The elements in the
FIFO table
Pointer. Index of the
last element of the
FIFO table.
The element to write to
the FIFO table
Energized when IN is
written to the last
element of the table
Allowed Operands
Constants
All except constants, data flow, and S.
SA - SC allowed only for WORD, DWORD
types
All except constants, data flow, S - SC.
All. S – SC allowed only for WORD, DWORD
types.
Power flow
Mnemonics:
FIFO_WRT_DINT
FIFO_WRT_DWORD
FIFO_WRT_INT
FIFO_WRT_UINT
FIFO_WRT_WORD
Optional
No
No
No
No
No
GFK-2950C

Advertisement

Table of Contents
loading

This manual is also suitable for:

Pacsystems rx3iPacsystems rsti-ep

Table of Contents