Figure out and dispaly line speed on HMI, how would you do it?

LowRange

Member
Join Date
Jun 2016
Location
Omaha
Posts
52
I need to display the line speed of a filler on the HMI. I guess at one point the PC based HMI was able to display line speed in Bottles Per Minuet (BPM) but since the switch to a PVP+ this ability has been lost. Lets assume we have no rungs in the project (deleted I guess) dedicated to calculating BPM and that we will be figuring out how to do this from scratch.

1. The line fills by diving fill nozzles into a row of 8 bottles

2. Machine filling speed (number of cycles it makes not how fact it squirts stuff) is raised or lowered by increasing or decreasing the delay between fill cycles through the preset value on an "end of of fill delay timer".

I've been giving it a go in an emulated micrologix and I can tap into the done bit of the delay timer to count every time the delay timer is finished and then multiply the ACC of the counter by 8 (fills 8 bottles per cycle) to get to our bottle count. I guess I could grab this bottle count at 59.9 seconds every 59.9 seconds or something and display it on the HMI but this seems really stupid.

I'm new to all this. How would you go about doing this? Attached is my fugly project. Time base bit is being used to simulate stuff happening above the 1st rung that is not actually there because I'm playing around on an emulator.


EDIT: oops T4:0 is my "end of fill delay timer"

Image 1.jpg
 
If you want to do it really neatly, you want an FFL, an FFU and an AVE instruction. Let's say you create an average across the last 10 bottles. We'll assign N7:0 through N7:9 to be our array of data to calculate our average from.

Each time a bottle is filled, do the following for one scan:
1. Check how long it took to fill (timer ACC)
2. Check if your array is full of data (FFL DN bit set). Tip: it will always be full, except for the first time you run it and fill up the array
3. If the array is full, use the FFU to unload the oldest data
4. Use the FFL to store the latest bottle filling time
5. Use the AVE to calculate the average of the values stored in N7:0 through N7:9
6. Use that average value to calculate the bottles per minute (60 seconds divided by the number of seconds to fill each bottle)
7. Profit!

Two gotchas:

1. If the machine stops for an hour, you don't want to load that 3600 seconds into your array; it'll throw out your average. You will need to find a way to detect and disregard rogue values like that one - a simple limit test might do the trick, or else you could perhaps use a machine status flag of some kind.

2. When the machine stops, you should display 0BPM on the HMI. You don't want to clear out your average value - that should be maintained so that it can pick back up where it left off when the machine restarts. Perhaps have the HMI "BPM" display tied to a completely separate address, say N7:20. If the machine is stopped, you move zero into N7:20; if it's running you move your calculated value into it.

Good luck!
 
I haven't gotten the chance to play around with arrays or some of the instructions you have mention so it should be fun. I already like the idea of an average instead of updating the BPM value every 59.9 seconds. I'll have to play around this tomorrow. Thanks for the suggestion. Here's the screwy thing I made that was my starting point. Just about anything would be neater than this.

Image 2.jpg
 
Normally, what I will do is measure the time per cycle and then divide it into 60 seconds to find out the number of cycles per minute. This gives you a rate every time a cycle completes which is more useful on slower processes.

If you have an address you can monitor that changes states upon each cycle completion, use the rising edge of that address to trigger the calculation.

If the process is fast, you may get a rapidly changing result. IF the process is not extremely repeatable, you may get a "jittery" result. You can still use this method for the calculation and then average or filter the results to make it more steady.
 

Similar Topics

hi all i am new here i have a mitsubishi smart touch hmi i.e ms-60t-pe but i cannot find a software to edit and download a program in it any help...
Replies
3
Views
163
Hello, I am trying to connect a Stride Analog Output module to a 1769 CompactLogix via Ethernet. I added a new Generic Ethernet Module for the...
Replies
4
Views
240
Dear all, I am beginer in ifix hmi programming. I have 2 ifix 6.0 pc with license FiX and client.. Can some one tell me how to configure sample...
Replies
0
Views
151
Hi all, the machine I am programming the Rockwell PLC for has about 100 parameters that need to be adjusted for every customer. I would like to...
Replies
20
Views
1,976
Within the last week or so, PME has crashed whenever I try to open a configure IO screen. I am running V8.0 Build 6215. Offline configuration of...
Replies
3
Views
400
Back
Top Bottom