Sign in to follow this  
Followers 0
Duffanator

FIFO Instructions

4 posts in this topic

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: 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!

Share this post


Link to post
Share on other sites
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. Edited by Inntele

Share this post


Link to post
Share on other sites
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. Edited by Glumglum

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0