Sign in to follow this  
Followers 0
Guest jaed

FIFO for large arrays

2 posts in this topic

Hello! Anyone have a good algorithm for handling large FIFO's? When I use the built-in FIFR function on a 20k-size array, the PLC times out... I guess it's not intented for this size of fifo... //j

Share this post


Link to post
Share on other sites
For large FIFO use indexed addressing and manipulate a pointer instead of moving the data registers contents. I do not have ready ladder, but here is an algorythm. Determine the FIFO array. Assign a data register for pointer. It may be an index register, or a regular data register which will be copied to the index register immediately prior to FIFO read/write operation. In the program: First initialize the FIFO registers contents, if necessary for your application. You may need to fill them with zero values, for example. Also initialize the pointer. It must be always within the FIFO addresses range. After that, at any moment the FIFO output is in the register, addressed by the pointer. When writing to the FIFO (pulse operation): - Write to the register addressed by the pointer. - Increment the pointer register. If the result is out of the FIFO addresses- write the first FIFO register number to the pointer. Edited by Sergei Troizky

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