Packs per minute

J

Thread Starter

Justin Lund

I need to be able to show a packs per minute figure on a panelview. I am using SLC 500. The figure needs to update a lot more than every minute.Has anyone done this before?
 
This is easy...

xic product_detect_in ctu product_count 1000 0
xic 1_sec_pulse.dn bst mul product_count.acc 60 product_per_minute nxb
res product_count bnd
xio 1_sec_pulse.dn ton 1_sec_pulse .01 100 0

Obviously, subsitiute appropriate register addresses for the symbolic labels
I used above.

You display product_per_minute and it will be a fairly accurate guess at your
production rate. Note that the PLC scan rate will limit how fast you can
actually count using this scheme. Total ladder length will determine how
long your scan time is. You should be able to count 20-30 items a second
unless you are doing some fairly complex stuff in the ladder (like PID loops).

If you need higher count speeds, then you should look into a dedicated
counter module.


--
Ron Gage - Saginaw, MI
([email protected])

Free Gas Price Tracker - http://gastracker.rongage.org
 
Not familiar with SLC 500, but - measure time between packages in seconds,
invert, multiply by 60 (to convert to "per minute")?

rate = 60 / time

That'll give you the immediate packs-per-minute figure.


If necessary, apply smoothing to taste, perhaps avg = 0.9*avg + 0.1*rate
That'll give you a smoother figure which still updates quite quickly (you
can tune that easily).


The disadvantage is that if the rate drops to 0, this method won't pick it
up until the next pack comes along. But if the rate is zero there's
probably other problems, or you can have a timeout and set the figure to
zero as a special case. You may want to exclude near-zeroes from the
smoothing, too.

Jiri
--
Jiri Baum <[email protected]>
http://www.csse.monash.edu.au/~jiribvisit the MAT LinuxPLC project at http://mat.sourceforge.net
 
Top