Has anybody used a FIFO "first in fist out" function block and where would I be able to download it from

I need to write a program to control data into a first in first out function block Can anybody recommend where I can get it from.

Hi Rob, It would be a challenge to provide a generic FIFO FB, I think, because of (a) the unlimited list of data types that could be stored in the buffer, and (b) the capacity of the buffer. Both of these would need to be hard-coded into the FB, so (unless I’m mistaken) there would need to be one FB for every possible type and capacity. I think that in this case you will need to roll your own FIFO FB for your own data type and capacity. A simple FB with Add and Remove methods, and internal Head and Tail array pointers, should do it. ~ Martin.

As my colleague Oliver has pointed out to me, an FB written in C# can allocate memory dynamically, so (unlike an FB written in IEC code) the capacity of the FIFO buffer could be assigned at run-time. However the Type issue would still be a problem, so a custom-written FIFO block would probably still be necessary. ~ Martin.