Help - Search - Members - Calendar
Full Version: FIFO Instructions
Forums.MrPLC.com > PLCs and Supporting Devices > Mitsubishi
Duffanator
Hey all,

I was going through the instruction set in GXDeveloper and ran across these functions: FIFW and FIFR (FIFO write and read). The details for the write function is this:
QUOTE
Performs the following actions: Stores the data specified at S into the data table of FIFO table. The storage position of data is as indicated below. Data storage position = head address of data table + content of pointer.


How do you create a data table? There is no part of this function that defines how big the data table is or anything like that. Do you create a data table seperatly and then just access it with these functions? This sounds interesting and I'd like to play around with it if anyone knows any additional information about it. Thanks!
Inntele
QUOTE (Duffanator @ Nov 12 2009, 11:59 PM) *
Hey all,

I was going through the instruction set in GXDeveloper and ran across these functions: FIFW and FIFR (FIFO write and read). The details for the write function is this:
QUOTE
Performs the following actions: Stores the data specified at S into the data table of FIFO table. The storage position of data is as indicated below. Data storage position = head address of data table + content of pointer.


How do you create a data table? There is no part of this function that defines how big the data table is or anything like that. Do you create a data table seperatly and then just access it with these functions? This sounds interesting and I'd like to play around with it if anyone knows any additional information about it. Thanks!


Hello,

I think you talk about Q-series... You no need to create the table because the table is only a memory area with the head address is specified by you as D-operand in the FIFO-instruction. The detailed information about FIFO-functions you can find in this document QCPU Programming Manual (Common Instructions 1/2) that you can download from Mitsubishi official website. smile.gif
Glumglum
Hello. Im onely familiar with GX IEC Developer, and have used the FIFO funktions several times.
With the funktion block LD_GE_M you spesify the number of words you vant the register to use and the start adress.
This funktionblocks outputsignal is used to stop writing into the register when its full. Block the input on the FIFWP_M with this signal. Otherwise it will continue to write into the PLCs memory.
With the FIFWP_M you write into the register and the data you put in on the "s" input on this block is written into the register, the "d" output is the same adress
you used as start adress in the LD_GE_M block.

NB! the first word in the register handels the number of positions written into in the register.
E.g. If you start the register at D3000. The data in D3000 is the value of positions in the register with data.
The data you enterd will be stored in D3001 and up. If you write 3 times the value of D3000=3 and so on.
So if you want 10 positions in the register you need to spesify 11 in the LD_GE_M block.

When you want to read out of the register you use the AND_LE_M funktion block where you spesify how many positions in this register to read from and witch register e.g. D3000. "s1"= positions and "s2"= register start,
and connect the ENO of that block to a FIFRP_M funktionblock. You also need to spesify an adress to write the data to on the "s" input on the FIFRP_M block on the "d" output you spesify the register start e.g. D3000.

Thats how its done in the IEC version.

By the way FIFO stands for First In First Out. So the first data who is put into the register is the first to be written out.

Good luck.
Crossbow
The table command builds the table, and there is no means inside the instruction to limit the table length, you would have to do that externally with other commands. So as such, you don't build the table. Each time you trigger the command, the data is stored in the next register unused in the sequence, and the count is updated.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.