Batch dosing logic

Snap25

Lifetime Supporting Member
Join Date
Dec 2014
Location
Michigan
Posts
237
Does anyone have some example programs for batch dosing (liquid) they would like to share with me? An AOI would even be better!

Enter gallon set point; Transmitter sends the GPM signal to the analog input; Convert that into a live accumulated gallons (that is where I'm having issues); a dosing complete bit to shut down the pump and valves.

I don't want anyone to go out of their way to make anything because I can figure it out eventually.. seeing an example would just speed it up for me.


FYI. I'm using an 1756-L71 and most likely going to use the same logic on everything (all compactlogix and an occasional controllogix)
 
Yes sir. I have everything wired up and scaled. I just need to implement the "dosing system".

Just trying to figure out the best and most accurate way to do this. I would like to do it with an AOI or Function Block
 
I use a PIDE instruction, PV value comes from 4-20 mA signal from flowmeter. Batch size must come from flowmeter totalizer, you take totalizer value at starting, then you can control flow thru PIDE. When batch size is complete you stop dosing based on actual totalizer minus initial totalizer value.
 
A quick glance and it doesn't look complicated to implement but once you open up the logic there is much more than that picture shows!

p_doseFM.jpg
 
You need to decide how to totalize. Can the flowmeter do it for you? Is it wired for 4-20mA (for flowrate), pulse (for total)? If not you can do it all with 4-20mA. If its on a network bus, then you can do much more.

Totalization is pretty easy, you simply add the instantaneous flowrate to an accumulator. Only time you have to worry about it is if the value gets extremely high. I've done large batching systems using 4-20mA and it's pretty accurate. +/- .5lb on 2500lb addition.

Step 1 - Reset your accumulator
Step 2 - start the pump
Step 3 - accumulate your total via flowrate
Step 4 - when ACC > SP shut it down.

You can get more fancy if you need high flowrate and high accuracy, add a 'fast addition' step where your running your pump at 100% of setpoint then a 'slow addition' step where you run the pump at 40% of setpoint. Slowing the down ensures you don't over-shoot your target. Of course, you have to be aware of keeping the lines packed with fluid and accounting for any manifold space and drainage after stopping the pump and closing valves. Air pockets will cause inaccuracy.

Run the accumulator logic in a periodic task. Set it to capture the flow rate and add it to the accumulator. The catch is to convert the GPM unit to the proper time unit for your periodic task. If you set the periodic task to 1 minute, well there isn't anything to change. However if you run the periodic task at 500 ms then you need to convert the flowrate from GPM to gal/500ms before adding it to the accumulator.
 
Last edited:
For P_DoseFM, if the flowmeter provides a flow RATE (e.g., analog GPM via 4-20 mA), set Cfg_CalcRate to 0 and Cfg_CalcQty to 1 -- the block will totalize the flow rate for you. If you use an EtherNet/IP flowmeter that provides rate and total (quantity), set both those Cfgs to 0 and wire the rate and quantity inputs to the block, and wire the totalizer reset output to go to the meter. And if the meter provides pulses and you are using, say, a CFM or HSC card, do the same (the card provides count and rate), and be sure to configure the rollover count in P_DoseFM the same as it is on the card, so the block will know when the count goes from, say, 999,999, back to 0.

After that, just use the outputs on the block to trigger the equipment to start flow, stop flow, and set flow to dribble rate (if it has that capability).

The block should take care of everything else. Just use the commands shown on the diagram posted above, either from the faceplate (Oper mode) or from code that starts batching (Prog mode).

Don't let the complexity fool you. P_DoseFM has lots of configurable capabilities for complicated situations, but the default setup is for a pretty simple setup. The main thing to remember is to set up Cfg_CalcRate and Cfg_CalcQty for the kind of meter you have, and set up the scaling. Everything else is "bonus"/"special" and you can enable options on the Engr tab of the faceplate (like dribble).

Hope this helps!
Dale
 

Similar Topics

I have batch dosing system that I would like to try to implement an adjustment factor on the HMI to add or subtract x% of the accumulated dose...
Replies
2
Views
1,362
Hi Everyone, Thought I had it figured out but I came to the conclusion it would not work. Here is what I'm working with... 1769-L30ER Flow Meter...
Replies
24
Views
731
Does anyone have expereince creating a custom API to build a campaign management system for FactoryTalk Batch? Stuck between using a REST API or...
Replies
0
Views
485
https://literature.rockwellautomation.com/idc/groups/literature/documents/qs/iasimp-qs042_-en-p.pdf The video links in this pdf are not working...
Replies
1
Views
1,139
Can someone shed some light on what the connector is that allows Batch to connect to Historian and create historical trends based on batch...
Replies
0
Views
703
Back
Top Bottom