Help with FIFO'esq type of instruction

Brandon_K

Member
Join Date
Mar 2016
Location
Pittsburgh, PA
Posts
150
Hey guys,

I have a scenario where I need to fill a data register with characters, likely alpha numeric.

Lets say I have 4 momentary push buttons, button 1 has a value of "a", button 2 has a value of "b" and so on.

I need to copy those button presses to a register that will contain up to 8 characters. So if button 1 is pressed, then 2, then 1, then 2, 3, 4, 3, 2, the register would contain "ABABCDCB". If button 4 was then pressed again, the first "A" would get pushed out and the resulting data would be "BABCDCBD"

I'm using Productivity 2000 hardware and there is a FIFO instruction, but I'm having a difficult time wrapping my head around some of the terminology of peek, push, pop, etc. The instruction seems overly complex for my needs.
 
When using the FIFO/LIFO (FILI) instruction you can not see the whole buffer just the one element that is in the PEEK position. Which is probably not what you are after.
 
That is correct, that isn't what I'm after. I would need to see the whole buffer (assuming I can limit the buffer to 8 characters).

Looking at the instruction, it appears the buffer is not addressable or readable by the user.

Any other thoughts?
 
I don't know about other software but with Rockwell the FIFO uses file to store the data.
you can access the file as a separate function just look at the tags and expand it view the stored data
you can even do a file search on the data if you want
 
You could build a string of the letters based on the first 8 button presses.
You would have to determine where in the string you want to get/put the characters.
Position 1 is the left-most character.
 

Similar Topics

Hello all, I need some guidance creating a FIFO array to display data into an HMI. The data will be the sum of jams of a conveyor section in an...
Replies
5
Views
2,671
Hello Friends I need to save 2 tags (String and DINT) in a FIFO of 10 elements. When a programmed condition is true, this 2 tags should enter...
Replies
3
Views
4,558
Hey, I am trying to implement a FIFO as a sort of memory option when I am trying to log the last 30 values of a variable. Due to the lack of...
Replies
10
Views
4,249
I have read the various threads on the FFU/FFL uses. I am trying to chase down an issue I am having with a program one of my predecessors wrote. I...
Replies
15
Views
3,791
Hi guys I am trying to get how fifo work in my head and I have attached a program that I have got working but not sure about the unload, I have...
Replies
37
Views
9,713
Back
Top Bottom