Panasonic FP-E Programming Manual page 523

Fp series
Table of Contents

Advertisement

Precautions during programming
An error occurs if the F116 (FIFR) instruction is executed when the number of stored data items (S+1) is 0.
In the program noted below, the F116 (FIFR) instruction is not executed if the number of stored data items is 0.
X0
DF
F115 FIFT, K256, DT0
R9010
F60 CMP, DT1, K0
X2
R900B
DF
F116 FIFR, DT0, WY4
How the FIFO buffer is used
The FIFO buffer is a buffer area in which data is stored in the order in which it is written to the buffer, and from
which it is then read out in the stored order, starting from the first data item stored. It is convenient for storing
objects on carrier lines and buffer lines in sequential order.
Usage procedure
The area to be used is defined as the FIFO buffer using the F115 (FIFT) instruction. (This should be done only
once, before reading or writing is done.)
Data should be written using the F117 (FIFW) instruction, and read using the F116 (FIFR) instruction.
Writing data
When data is written, the data items are stored in sequential order, starting from the first data storage area.
The writing pointer indicates the next area to which data is to be written.
If the data storage area becomes full, further data writing is inhibited.
Reading data
When data is read, data is transferred starting from the first data item stored. The reading pointer indicates the
next area from which data is to be read.
An error occurs if an attempt is made to read data when no data has been written to the data storage area.
Example of data storage area
15
Reading
pointer ▲
K100
K101
K102
If data is written in the status shown above, the data will be stored in the area indicated by 3. The writing
pointer moves to 4 (the next data item will be written to 4).
If data is read, it will be read from the area indicated by 0. The reading pointer moves to 1 (the next data item
will be read from 1).
Phone: 800.894.0412 - Fax: 888.723.4773 - Web: www.clrwtr.com - Email: info@clrwtr.com
FIFO definition
Check the number of stored data items
FIFO Read out
0
0
1
2
3
▲ Writing pointer
4
High−level Instructions
3 − 259

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fp0Fp2Fp2shFp0rFrsFp10sh ... Show all

Table of Contents