Fifo Read - 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.3

FIFO Read

The First-In-First-Out (FIFO) Read (FIFO_RD) function moves data out of
tables. Values are always moved out of the bottom of the table. If the
pointer reaches the last location and the table becomes full, FIFO_RD
must be used to remove the entry at the pointer location and
decrement the pointer by one. FIFO_RD is used in conjunction with the
FIFO_WRT function, which increments the pointer and writes entries
into the table.
1. FIFO_RD copies the top location (entry 0) of the table to output parameter Q. Additional program
logic must then be used to place the data in the input reference.
2. The remaining items in the table are copied to a lower numbered position in the table.
3. FIFO_RD decrements the pointer by one.
4. Steps 1, 2, and 3 are repeated each time FIFO_RD is executed, until the table is empty (PTR = 0).
The pointer does not wrap around when the table is full.
When FIFO_RD receives power flow, the data at the first location of the table is copied to output Q.
Next, each item in the table is moved down to the next lower location. This begins with item 2 in the
table, which is moved into position 1. Finally, the pointer is decremented. If this causes the pointer
location to become 0, the output EM is set ON, i.e., EM indicates whether or not the table is empty.
FIFO_RD passes power to the right if the pointer is greater than zero and less than the value
specified for LEN.
Note: A FIFO table is a queue. A LIFO table is a stack.
Operands for FIFO Read
Note: For each mnemonic, use the corresponding data type for the TB and Q operands. For
example, FIFO_RD_DINT requires TB and Q to be DINT variables.
Parameter
Length (??)
TB (must be the same type as
Q)
PTR
EM
Q (must be the same type as
TB)
178
PACSystems* RX7i, RX3i and RSTi-EP CPU Programmer's Reference Manual
Description
1  Length  32,767.
The elements in the FIFO table All except constants
Pointer. Index of the last
element of the FIFO table.
Energized when the last
element of the table is read
The element read from the FIFO
table
Allowed Operands
Constants
All except constants, data flow,
and variables in %S -%SC
Flow
All except constants, S; SA, SB, SC
allowed only for WORD, DWORD
Mnemonics:
FIFO_RD_DINT
FIFO_RD_DWORD
FIFO_RD_INT
FIFO_RD_UINT
FIFO_RD_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