Sign in to follow this  
Followers 0
bearsgone

RSLogix 500 Flow Meter Totalizer

17 posts in this topic

Hello I have ML 1400 with Signet 2551 flow meter. I am totalizing flow every day, however there is significant discrepancy about 2 thousand gallons a day PLC is under. Meter is set up correctly: K factor and range 0 -70 GPM. On PLC side: Say FE103(Flow Meter) I have scaled for PID 60 Hz and 450 ms. It never shows as zero always 6 or 7. Is not it suppose to be zero when there is no flow? Not sure where the problem in my code or PLC scan time or the way I am going about scaling? Any pointers would be appreciated Totals.pdf

Share this post


Link to post
Share on other sites
Are you sure the meter is supposed to indicate 0-70 GPM? If you are using it in 1 1/4" pipe the meter manual states max current at a flow of 67.1 GPM. With that number-- 67.1GPM *60 min/hr * 24 hr/day =96624 Gal/Day 70 GPM * 60 min/hr * 24 hr/day = 100800 Gal/Day Thus at full scale your error is 4176 Gal/Day. I would check the manual for the meter and set the scaled max to the max flow indicated for your pipe size. The input min in the scaling looks a little small also. Hope this helps. Edited by J. B. Jennings

Share this post


Link to post
Share on other sites
Being off by 2 thousand gallons a day might be pretty darn good if you're using a half million gallons a day. Translate that error to percent for us... If you're using a PLC analog input from the flowmeter analog output which represents the flow rate at any given time, there will always be a discrepancy. I don't care how fast you scan the input and how precisely you scale the signals, there will be at least some tiny error...and that tiny error gets added to the total 10 time a second for 24 hours...So don't expect a perfect match. With that said, you can still get close, and should be able to get within a couple percent. We have a system doing the same thing you appear to be doing, and it's always off by about 1 to 5 thousand gallons...not bad considering the daily total is over 400,000...To do this, the logic that totalizes is in an STI routine so that it totalizes at a definte frequency. In practice this is only slightly better than your timer logic. We went the extra mile with the STI for a minor improvement and to satisfy the boss that we'd done everything possible to get as close as possible without putting in a new meter capable of communicating digitally with the PLC. That is the ideal situtation. Let the meter do its thing and use a MSG to read the total. Then you get the exact same numbers. In your program, where does F8:19 come from? Also, since you are using T4:30 as your interval timer, you might want to set its preset a little higher than you have it. You might be confident it never times out, but if it does, you will lose any accumulation that occurs. When I construct a timer like that for interval accuracy, I normally set the preset to the max of 32767 and put in a comment to explain why its done that way. AND, I see you are ignoring flow signals when (either?) pump current is less than 0.5 (amps?) This seems fishy...I know you don't want to accumulate noise error when the flow is known to be stopped, but you're chopping off the ends of every ramp of the signal with that... I would suggest double checking your analog scaling with a precise meter, and verify the scaling numbers are right as suggested by J.B. But if you're already within 1 or 2% accurate over a 24 hour period, that's probably nearly as good as you can get. Paul Edited by OkiePC

Share this post


Link to post
Share on other sites
Hello Based on K factor the flow is between 0-145.15 GPM When I talked to Manufacture Support they said that that recommend reducing the range. So meter itself has K factor set plus the range 0-70 GPM instead of 0-145.15GPM On PLC side I am doing the same 0-70GPM and range 0-16383, I also tried -819 to 16383. I always come out lower then Signets panel says

Share this post


Link to post
Share on other sites
Re OkiePC Thank you for pointers To answer your questions: I am off by 2-3k gallons every day. Average day is about 25k gallons, so it is significant. F8:19 comes from another subroutine but it is also a flow meter scaled in a similar manner but different model, so called blind signet. I was given spec of SCH 80 PVC pipe 2". According to manual K factor is 206.69 which is used on signet panel itself for present flow and total flow. I am reading of signet panel into PLC. For 20 mA GPM manual shows 145.15. Sensitivity is 0. Even if I set SCP as: -819 to 16383, scale 0 - 145.15 gpm on PLC I am still under. Thank you

Share this post


Link to post
Share on other sites
If it's "off" by that much, then you most likely have a scaling problem as J.B. appears to suspect. Are you using current or voltage for the analog signal? Are you using the embedded analog input on the 1400 or an expansion card? In any case, you should check that the signal is correct at at least two points, preferrable 0 gpm and 70 or the max gpm you can get a stable reading on. Once that's done, you should be able to confirm the numbers in the 1400 match as well and set the SCP accordingly. I have not used the 1400, but the book shows the embedded analog to be 12 bit unsigned voltage (0-4095), so you must be usign an expansion? Let us know the exact part number...hopefully it's not the 8-bit combo card (Catalog Number 1769-IF4XOF2) Edited by OkiePC

Share this post


Link to post
Share on other sites
What about a pulsed output water meter they are good to 2% or so I bough one for my home around $100.00 for a 3/4 inch one with pulser. even the 2" should be under $400.00 meters tom

Share this post


Link to post
Share on other sites
To answer OkiePC's questions: I have to use 1762-IF4 Ser A Rev B 4ch analog card, due to flow meters talking 4-20ma. ML 1400 does have on board AIs but they all digital. All Signets send me 4-20 mA. We checked for noise on the line and it is within spec. I guess the reason these particular meters are used is because of the environment, sewer plant. Does anybody have a suggestion for a better meter for this environment?

Share this post


Link to post
Share on other sites
Well, I found the installation guide for that card and I see that it has 15bit resolution + sign, so that is good. What I did not find is the proper scaling for 4-20mA mode. Will 0mA=0 raw? Will 20mA=16383 raw? Looks like A/B needs to update either the installation manual or one of the Micrologix manuals to show the scaling values. Since the card has a full range of +/-21mA, it would not surprise me if 0=0, and 21mA=16384, or 32767... I will search the knowledgebase... EDIT: Finally found it... Raw Proportional: 0mA=0 4mA=6241 20mA=31206 21mA=32767 Scaled for PID: <4mA=-819 4mA=0 20mA=16383 21mA=17407 Edited by OkiePC

Share this post


Link to post
Share on other sites
Thank you OkiePC for your help. I tried having a range of PID of 0 raw at 4mA to 16383 at 20mA. When there is no flow it shows 6 or 7 raw instead of 0. It is relatively small number considering the range of 0 to 16383. However I am still off (under) by 10 gallons a minute which leads me to believe that the problem is in my code otherwise I do not see where such discrepancy is coming from.

Share this post


Link to post
Share on other sites
One last round of questions. When you have zero flow, what is the output of the device? What are you reading at the input card? What raw value are you seeing for the input card? (Hint: this needs to be your raw input value and your scaled input value should therefore be zero). I agree with Okie on checking the values at zero flow and full sustainable flow. Use the same command, just edit the values for scaled min and max and raw min and max to what you find from your testing. It might be a good idea to have some other type of flow meter available since you are in essence calibrating this one. Hope this helps.

Share this post


Link to post
Share on other sites
What that means is you have a high zero from the flow device. Very typical, it would be very unusual for any device to have a perfect 4ma at zero flow. ( a little under or a little over) You can go to your flow device and adjust its zero down, but this is no guarantee it will stay there. Your best approach to to apply a low flow cut-off in the PLC before using the value. This is a very common feature with flow devices. Even after you do this the two totals ( your flow device and he PLC ) are not going to be the same. This is do to scan time, rounding, floating point issues. An old saying " Man with one watch knows what time it is, man with two watches is never quite sure". Edited by Mickey

Share this post


Link to post
Share on other sites
Don't forget that if your system spends any amount of time at all at "zero" flow because the output is rarely perfectly zero (it's either going to be very close or perhaps even negative), totalizing under these conditions will result in an erroneous value because of the accumulation of the error over time. Most of the time it's best to simply set a threshold where you know that the flow is definitely never "that low" without being zero and stop totalizing (or use a zero) whenever that condition exists. No amount of playing around with calibration and zeroing is going to last forever as temperatures, drift, and so forth will eventually invalidate your perfect calibration for zero. Best to simply make the system more robust by making it ignore values below a certain level. As to the comment about using "pulsing" type outputs...these are tricky with a PLC. Some (Micrologix) support "fast" inputs and/or PII's which allow you to capture fast pulses. Otherwise scan time is critical. Often these devices only pulse for a very short period of time and frequently if the PLC scan time is long (or remote IO is in use), the PLC might miss the pulses. You can use a high speed counter (though this isn't really high speed) to completely eliminate the problem, but otherwise realize that pulse length is going to be an issue ahead of time and plan accordingly to deal with this. In general I don't like the "pulser" systems because with an analog system you get some additional "diagnostic" type data that allows you the opportunity to diagnose potential problems.

Share this post


Link to post
Share on other sites
Hello At 0 GPM I get 4.006 mA from signet 8900 panel. It is never true 0 when there is no flow. For PID at 0 gpm and 4 mA it shows 6 or 7 What are you reading at the input card? Same 4.006mA Not sure about this: What raw value are you seeing for the input card? (Hint: this needs to be your raw input value and your scaled input value should therefore be zero). Could you clarify. I honestly believe that the problem is in the code. Any suggestion where I am be going wrong? Edited by bearsgone

Share this post


Link to post
Share on other sites
Hello Mickey and Paulengr thank for the tips. I honestly believe that the problem is in the code. Any suggestion where I am be going wrong? There will be some discrepancy but I am off more then 10% which leads me to believe there is an issue with how I go about adding flow to a total. Maybe there is more efficient way Edited by bearsgone

Share this post


Link to post
Share on other sites
Hello Thank you for the tip. Would it be possible to see an example of low flow cut-off? Thank you

Share this post


Link to post
Share on other sites
See picture
1 person likes this

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0