Totalizer

phil hughes

Lifetime Supporting Member
Join Date
May 2005
Posts
31
I have rs logix 5000 and in my application I need to write some code to be able to write a "total flow required" setpoint to the P.L.C. and totalize the amount of air flowing through the flowmeter and shut a solenoid off when the setpoint is reached.The flowmeter gives a 4-20 mA output.I realize if I had logix pro it has the totalizer function unfortunatly I have to write the code myself.I have seen some applications that use the scan time of the P.L.C. This may not be neccasary as my accuracy can be +/- 2% so a timer may be an option,
Regards
Phil
 
Your 4-20 mA signal will efefctively be quantity/time (gallons/min) or something similar. If you were to multiply this by the time this would give you a simple method. For example lets say the analog signal has been scaled as follows. 4 mA = 0 gallons/minute and 20 mA = 100 gallons/minute.

Now, take a sample of the analog value every 1 minute and these readings are 12 mA. This 12 mA equates to 50 gallons/minute. If you signal is very stable you could say that 50 gallons/minute x 1 minute is 50 gallons. The problem with this approach is that it does not take into account any fluctuations in flow rate, the smaller that you can make you sample time the more accurate your final answer will be.
Like I said this is a simple solution and I am sure there will be more accurate ones shortly.
 
Just create a periodic task and accumulate the scaled flow rate every scan of the task. For best accuracy, try to set up the scaling so that you are not too far into the low end of the units and also so that it won't overflow the accumulator's data type.

For example if your task runs every 1 second and you find that 0.00000001 gallons per second are flowing by, you may want to change your units to Gallons*1000 or something like that.
 

Similar Topics

Hi, So we have a flowmeter installed but doesnt have a feature to send a pulse to plc for it to compute the total volume. I want to somehow...
Replies
3
Views
570
How is it going y'all? So We have had a pesky problem with an EH 300 flow meter. We are using EIP to reset the totalizer, and for some reason the...
Replies
3
Views
768
Good morning, I have a flow meter that has an output pulse configured to 378.541 liters per pulse. My question is, do I just count the pulse per...
Replies
19
Views
1,776
Good morning, I have a flow meter that that has an output with is a pulse. The pulse is configured to 378.541 liters per pulse. My question is...
Replies
6
Views
694
Hello You guys helped me with a similar issue some time back on storing totalized values to different tags each month. I have a similar issue...
Replies
19
Views
1,470
Back
Top Bottom