Need a Fresh Idea

The Plc Kid

Member
Join Date
Feb 2009
Location
Macon, Georgia
Posts
3,233
I have a percentage variable that is based on a hourly calculation. Each hour this percentage is updated and displayed on the HMI

I have also the WallClockTime stamped with it. Now they want to display the last 12 hrs % and its time stamp.

Would using a FIFO be the way to go? How is the best way to keep the fifo for the % and the time stamp in sync with no issues and no way for them to get out of sync?

Looking for Ideas from the Pro's
 
Never used the FIFO before and the instruction help is not great.

Do I have to use a fifi load and a unload or is there a way to just reset the fifo load when the Length and the position are equal?
 
The FFU/FFL pair is very useful when the size of the stack varies. If you are going to show the last 12 hours, your stack will always have a size of 12 items, so the FFU/FFL pair is overkill (but could still be used).

I would instead opt for using COPy with indirect addressing and shift the data in the downward direction, putting the newest data in the highest position in each file.

With that said, I think I can find some links to good examples of the FFU/FFL pair.
EDIT:http://www.plctalk.net/qanda/showthread.php?t=18344
 
Last edited:
OkiePC

What are you refering to when you say shift the data downward?

That is what i want to do but i thought the fifo was the only instruction to do that?

I have used bit shift stuff many times but what other instructions will shift data down like that on a word level / Dint level to be exact as it is clogix.
 
this is logic for a Sorter but should give an idea of what Okie is talking about using COP and FLL instruction. check out rung 26 for COP command.
 
I believe if you copy 0 to 1 for length it will copy 0 to all. But you copy 1 to 0 for length it shift everything up and you have to clear the last.
 
I believe if you copy 0 to 1 for length it will copy 0 to all. But you copy 1 to 0 for length it shift everything up and you have to clear the last.
This is correct. That is why I copy "downward" from element 1 to element 0 and stuff the new data in the highest element in use (element 11 in your case).
 
If you want to shift it the other way then you need to copy if to a temp array first.

COP Array[0] ArrayTemp[0] len 12
COP ArrayTemp[0] Array[1] len 11
MOV NewData Array[0]

You could also simply use the WallClockHour to indirect to an array of 25 elements, this is often simpler:

MOV NewData Array[WallClockHour]
 
Last edited:

Similar Topics

I have an old Sentry Palletizer (S/O Number 3007 / Serial Number 1172) that has lost its program as the backup battery died years ago. I can...
Replies
0
Views
103
So i've been at this for a long while, i have Citect Scada 2018, i have full access to everything but i can't seem to find any option or...
Replies
0
Views
67
I've got this 3-phase 575V motor that we're controlling with a VFD (Variable Frequency Drive), which has been quite the learning curve in itself...
Replies
10
Views
309
I'm fairly new to Rockwell software, I've had some basic training in the past but nothing too advanced. My company and I use Reliable products for...
Replies
11
Views
377
Hi all, I am having issues accessing my Cimplicity software - the site code changed after re-install and I am no longer able to attain a new key...
Replies
10
Views
194
Back
Top Bottom