Using FIFO for history

I'm trying to find a simpler solution to how we display tag history in our HMIs today. This isn't for trending just the last 3 results. Right now we're using MOV: MOV new to one, MOV one to two, etc. It's simple but clunky in ladder.

I wanted to try a FIFO array. Which I have working, except I'm not sure the best way to access the values. With FFL/FFU and an array of real[20]. Once the array is full, the latest 3 would be the 18, 17, and 16 entries correct? My issue is what options I have for when it's only half full or newly initialized.

I could be looking at this all wrong I was curious how other people might handle this.
 
,,,Right now we're using MOV: MOV new to one, MOV one to two, etc. It's simple but clunky in ladder. ...
The question is in what order the code executes the MOVs.

Did this not work?

I wanted to try a FIFO array. Which I have working, except I'm not sure the best way to access the values. With FFL/FFU and an array of real[20]. Once the array is full, the latest 3 would be the 18, 17, and 16 entries correct? My issue is what options I have for when it's only half full or newly initialized. ,,,
[19], [18] and [17], but yes.

More generally, It's [.POS-1], [.POS-2], [.POS-3], assuming Logix FFL/FFU convention.

N.B. once the FIFO is full (.DN value is 1, and POS value equal to .LEN value), the code needs to do an FFU before each FFL.

Read the 1756-rm003 manual; there are detailed flowcharts. There are errors in the manual, but I forget which instruction have them.
 
Ohh man I knew it would be simple. [.POS-1], [.POS-2] is exactly what I was looking for.

I do trigger the FFU on the .DN bit before the FFL. It was loading and unloading properly I just needed that .POS-x instead of referencing specific locations in the array.

The old way works, but the way we do it today it isn't always just a single line and looks cumbersome. I was just looking for a more streamlined approach.
 
Nice, the code should trigger the FFU on the AND-ed (series-ed) result of your trigger and the .DN.

Also, there should be guards around the [.POS-1] and [.POS-2] references in case .POS is less than 2; I am not sure, but I think that would halt the PLC.
 

Similar Topics

The exercise is to keep tracking of three boards coming down a conveyor. Each one hits a part present switch. From the part present switch there...
2
Replies
2,590
Views
AB SLC 5/04 RSlogix 500 I have been trying to keep track of how many hours some conveyor motors run in a 24 hour period and be able to look and...
14
Replies
4,374
Views
Hello, I'm currently programming a MicroLogix 1400 in RSLogix Micro, and I'm trying to put data into FIFO queues. Would you know how to use the...
4
Replies
6,140
Views
Attatched is the logic for a dumb little project i'm working on. I tested it today and it woks fine other than needing the photo eyes...
28
Replies
10,722
Views
hi guys, really need your help again.. i find it difficult not familiar with Omron software while my project schedule is so tight! I would like...
7
Replies
13,877
Views
Top