I have a setup where material is continuously being loaded into the system via a silo. By continuous I mean material can be loaded into the silo at any time. I have access to this weight at all times. The material is then fed onto a conveyor and I have the weight of the material in kg/min at all times.
The customer is requesting a 'refill' weight meaning as soon as the loading takes place they want to know how much material was loaded and also to take into account the amount of material being transferred over the conveyor during the same time the material is being loaded.
With it being a continuous process I am having difficulty determining how to do this. Attached are two easy charts of the silo weights with the top one, silo 1, with a mark at the beginning of loading and the second one with the mark at the end of loading. As you can tell the weight after loading goes down some due to the weight balancing off after material being dropped into the silo.
Silo 1 initial loading...
Silo 1 loading complete...
I'd also have to include something to say its only a legit loading of material if the difference in weight is over something like 10000 kg.
There is some confusion in your post and sorting this out may help clarify your thinking.
I have a setup where material is continuously being loaded into the system via a silo. By continuous I mean material can be loaded into the silo at any time.
Those are not the same thing. I think an edit (pencil icon below your post) is required. You probably mean "on demand".
The material is then fed onto a conveyor and I have the weight of the material in kg/min at all times.
"kg/min" is not a measure of weight. It is a measure of change of weight or the material transfer rate.
... how much material was loaded and also to take into account the amount of material being transferred over the conveyor during the same time the material is being loaded.
- Can you assume a constant loss of weight per unit time while the conveyor is running? According to the green arrows on my chart the outfeed is 17,500 kg/6h = 48.6 kg/minute. (Let's say 50 kg/min.) It looks consistent on the three areas marked.
- The topup looks like 25,000 kg in 30 or 40 minutes. Let's make the maths easy and say it's 1,000 kg/min - nearly twenty times the discharge rate.
- You don't state it in the question, but presumably you are monitoring the silo topup control and the outfeed conveyor run control and know when each is running.
- Is modification of the PLC code an option or does this all have to be done in Ignition?
If you can clarify some of the points we may be able to come up with a strategy.
By continuous I mean there is no start/stop to the process. The material can be loaded in the silo at any time so its not like I can say take the weight when start button is pressed and take weight after stop is pressed and weight has stabilized. "On demand" is a legit term for it I think. With continuous I also mean I have to figure out when loading is taking place solely based on the difference in silo weight.
You are correct about kg/min being rate of material transfer. It is probably not going to drastically change but would be nice to get the rates during refill and maybe average them out during refill duration.
I wouldn't say we can assume constant loss of weight over time for the conveyor so using the rate of weight transferred would be needed.
No modifications to the plc can be done, only using ignition.
From high level standpoint I was thinking of something like...
-keep reading in current weight
-if current weight is lower than min weight
-replace min weight with current weight
-take note of time (time_min)
if current weight is higher than min weight
-replace peak max weight with current weight
-take note of time
if peak max weight minus min weight is greater than 10000
-set flag 'refill in progress'
while refill in progress is set:
-if current weight is higher than peak max weight
-replace peak max weight with current weight
-take note of time
-if current weight is lower than peak max weight
-replace max weight with current weight
-take note of time (time_max)
-once max weight doesn't change more than 10kg over 3 minute period than consider refill done. take difference between max and min weight and that is your silo refill value. do sql query using time_min and time_max and get all conveyor rates values. Take average of them to determine amount transfer during min and max times and add that to silo refill value.
Fundamentally, this is integration of an analog value. Notoriously inaccurate. That said, you need:
-
A silo weight snapshot at a known timestamp
-
History that averages conveyor rate as accurately as you can from that timestamp to now()
-
Added weight is current silo weight minus snapshot weight plus ΔT × average rate.
You should compute rate of silo weight change and compare to conveyor rate. When that difference is significant, you can tell that loading has started and you should snapshot the silo weight.
4 Likes
It's a bit of a mess. One thing I'd recommend is that if you can't modify the PLC then add a small brick PLC to feed to Ignition the run status of the silo infeed and the conveyor outfeed. That gives you a much better means of figuring out what's going on and avoiding many of your if
s above.
Wish that were possible but don't think it is.
Seems like your suggestions are close to what I was thinking. Good point about just using the current weight instead of my max weight idea. Suggestions about doing it via gateway event script, tag script, something else?
If accuracy matters, I'd run a timer event about twice as fast as your OPC poll rate. Grab silo weight and conveyor rate, compute the derivative of silo weight with a short in-memory history (project script top-level variables persist between project edits). Once loading event is detected, save weight and timestamp and start integrating.
2 Likes