Logix 5000 Question - PID loop or no?

The bag is being weighed after the its filled and sealed. The final product is what we are checking and adjusting for.

The infeed flow and timing of fill/seal are the factors of how much the bag will weigh. Also, type of product as well.


In that case a PID may work here, but the key to it will be the massaging that needs to be applied to the weighings before they are fed to the PID as the PV. At a minimum I would do some low-pass filtering, otherwise the PID will be chasing noise and actually add to the variation of the product weights.


Another issue might be the deadtime and lag between the weighings and filtering and the PID.


If there is enough noise in the system, it might be simpler and adequate to skip the PID and increase the flow by some small increment if there are three (or five or ten or ...) consecutive weight measurements below the target, and decrease flow by an increment if there are some number of consecutive measurements above the target.


Also, there could be a feed-forward from the sealing machine bag speed and the flowrate, and the control element (PID or otherwise) controls that feed-forward scaling factor.
 
In that case a PID may work here, but the key to it will be the massaging that needs to be applied to the weighings before they are fed to the PID as the PV. At a minimum I would do some low-pass filtering, otherwise the PID will be chasing noise and actually add to the variation of the product weights.


Another issue might be the deadtime and lag between the weighings and filtering and the PID.


If there is enough noise in the system, it might be simpler and adequate to skip the PID and increase the flow by some small increment if there are three (or five or ten or ...) consecutive weight measurements below the target, and decrease flow by an increment if there are some number of consecutive measurements above the target.


Also, there could be a feed-forward from the sealing machine bag speed and the flowrate, and the control element (PID or otherwise) controls that feed-forward scaling factor.

I do not think a PID will work here, there is no live process, no live weigh scale during the fill process.

IMHO, I would run away from a PID for weight, there is no going reverse, no way to take weight out of the bag.

I have done mix tanks with weigh scales, and this was for the world leader in consumer products manufacturing making baby wipes, and they use the Spill method and apply the spill to future fills.

At their volumes 0.01% of some of those chemicals is a very expensive deal.

https://www.controlglobal.com/assets/Media/News/080623_WBF_FuncConsidered.pdf
 
Last edited:
I would store in a FIFO buffer the negative and positive "spill" values after weighing and keep an average in the PLC per product type.

I would average the spills and apply the average to my new cutoff time, or what ever you are using to stop the fill sequence and start the seal function.
This sounds like machine learning to me!

Excellent idea.

Thank you again everyone!
 
I do not think a PID will work here, there is no live process, no live weigh scale during the fill process.


The weighing happens as a discrete event after, not continuously during, the fill, so the process needs to adjust the flow rate, because the bag rate is constant (or at least known).


E.g. say this process was running and sealing sixty bags per minute (1Hz), the target is a net weight of 1lb per bag, and so you set the flow rate to be 60lb/minute, and every five minutes you take ten bags and weigh them. If their total net weight is 10.1 lb, then an operator would know to drop the flow rate by 1%.


The PID would be doing the same thing, but semi-continuously instead of every five minutes. Like I said, the measurement parameters (PID update time, filtering, etc.) will be the key to making it work.


P.S. I am assuming the flow is continuous and does not stop and start, so there is no "spill." That is what that video looks like to me. If I got that wrong, then the PID will not work.
 
Last edited:
The weighing happens as a discrete event after, not continuously during, the fill, so the process needs to adjust the flow rate, because the bag rate is constant (or at least known).


E.g. say this process was running and sealing sixty bags per minute (1Hz), the target is a net weight of 1lb per bag, and so you set the flow rate to be 60lb/minute, and every five minutes you take ten bags and weigh them. If their total net weight is 10.1 lb, then an operator would know to drop the flow rate by 1%.


The PID would be doing the same thing, but semi-continuously instead of every five minutes. Like I said, the measurement parameters (PID update time, filtering, etc.) will be the key to making it work.


P.S. I am assuming the flow is continuous and does not stop and start, so there is no "spill." That is what that video looks like to me. If I got that wrong, then the PID will not work.

There is always a spill. Check the link, it explains with a graph.

The Spill is just a term, it is the extra product in the bag after the valve is told to close.
 
I'm going to assume that you have some sort of auguring system: a screw that rotates to drop the food in the bag. But it could be a paddlewheel or other arrangement. What you want to do is run the drive at a fixed speed, count the rotations, and then calculate how far you're off. This is akin to celichi's "Spill" method.


Let's say that your target is 500g, which you guestimate will be 100 revs, for an initial ratio of 5 g:rev

The first bag gets filled after 100 revs. Let's say that the checkweigher says that it's got 525g in it. You calculate that, had you gone 100/500 * (525-500) = 5.0 fewer rotations, or 95.0 revs, you would have it hit the mark.

But there's variability in each run, so instead of taking off the whole 5.0 off of the 100, you take only maybe 20% (or 15 rev) of it.

So now the system thinks 500g = 99.0 revs.

Next bag, the augur turns 99.0 revs, and the checkweigher reads, perhaps 515g. Again, you adjust the rotations by 20% of the error, to get:
99.0 - [99.0/500 * (515-500) * 0.20] = 98.4 revs.

And so on. With each bag, the number of revs dials in to where it needs to be.

You can embellish this system by having deadbands, so that if you have too small of a difference, you don't bother to calculate a new g:Rev ratio, because you're "close enough". Likewise, if the bag weigh it WAY out of spec, something went badly wrong, and again, you ignore its influence on the g:rev ratio.

You can get fancy, and run the drive at a high speed (for throughput -- as rdrast suggested) then at low speed for accuracy (per Parky).

You can make adjustments to the ratio up faster than down (30% instead of 20%), because customers don't mind getting extra, but hate being cheated. Or the other way, because of corporate bean counters.

Measure rotation rather than time if you can. It's way more accurate / consistent.

If your checkweigher is way downstream of the filler, so that there are more than one bags which have been filled before the checkweigher can adjust the g:rev ratio, then use a FIFO to track the ratio that the bag was using when the checkweigher makes its adjustment. Also make the % adjustment smaller, since several bags will have not have found the "sweet spot" yet, and you don't want to over-compensate. In this way, what I'm describing is kinda like a PID, adjusting a CV (the ratio) by a fudge factor of the error, over time.

Because you are working with a weight:revs ratio, if you change the setpoint (for a different product / carton size), your program remains unchanged. If the dynamics of the product are dramatically different, the system is still self-adjusting and will find the right ratio.

Of course, it could be nice to store the ratio with the "recipe" for the product for next time. There's all sorts of ways this system can be embellished and improved upon. Bells and whistles galore!
 
There is always a spill. Check the link, it explains with a graph.

The Spill is just a term, it is the extra product in the bag after the valve is told to close.

I have also heard this called dribble weight but maybe that is just something we came up with here. But it's the same idea. it's what dribbles out of the valve after you command it to close.
 
What is a dedicated weight controller? do you have one you recommend? or are you saying the weight checking machine should be able to adjust the fill?


Also, the weight checker I'm using is a mettler toledo C3350 if that helps.

Thank you for the response!
Something like this:

https://blhnobel.com/pca/detail/5eccaf179066dc07d73965fd

Mettler Toledo makes weight filling controllers too. See here:

https://www.mt.com/gb/en/home/produ...trollers/programmable-weighing-terminals.html

They're not cheap and it doesn't mean that you can't do it on a PLC, but since you already have to get something to read the weight from the load cells, with a bit more you can get something like this device and not worry.
 
lots of knowledge in this fourm. Thank you everyone. I believe that i am going to go with the more simple approach of hav a PLC provide the transaction between the two machines and using compare inst. to adjust while keeping recipe and adjustments in a FIFO buffer so that its self improving and has a running log of adjustments.

This is miles from where we are today so im sure they will be happy with that.

Thanks again!
 

Similar Topics

hi , I need to sorry for my bad English first. I'm newbie at plc programming ,I had been asked about E/IP protocol information for some system...
Replies
3
Views
379
So I have a PID loop on an 1756-L61 running V17 software just for background. Also the PID PV is a pressure transmitter and the CV is speed sent...
Replies
1
Views
894
Hello Please Help, I want to use a FSC instruction that will scan 20 DINT arrays. If the arrays are greater than 1000 display the value. How do I...
Replies
4
Views
1,765
Hey all, I just joined today. Not sure if this question is in the right place or if anyone has asked it before. I am monitoring a machine from...
Replies
2
Views
1,445
Just for a verification, since I can.t currently check. I have a Message instruction in a 81E ControlLogix processor. I need to read one element...
Replies
12
Views
2,936
Back
Top Bottom