Best way of totalizing flow?

RaggSac

Member
Join Date
Mar 2006
Location
Kristianstad
Posts
3
Hi,

What is the best way of totalizing flow, number 1 or 2?

1. Using a flow-meters built-in totalizer pulse, that will pulse for say every 10m3. Then you only count pulse and multiply with some conversion factor.
What if the PLC lose pulses? (using profibus and no speed counter input, task interrupted, etc)

2. Using this formula: Total = Total + (Flow / TimeConversion) * TaskPeriod.
The risk with this method is that you need to be aware of adding small numbers in Real format.

Any Thoughts, better methods?

Regards Sac
 
I do all my flow totals with a pulse from the meter.

I also calculate from the instantaneous flowrate when a pulse should be given and operate a guard timer if the pulse doesn't get seen. This can be used to shut the machine down in case of pulse output failure (if it's process critical, otherwise just an alarm)

Missing pulses on the processor is, I think, a worry you need not have. Just make sure you keep the pulse width is long enough for the PLC and scale the pulse output from the FT according to the flowrate you have, there shouldn't be a problem.
 
opinion

my suggestion:

you better just take the data from the totalizer (flowmeter), and then transmitted to PLC using Modbus or Ethernet.

because many things that will cause the plc lost the pulse and false calculation.

experience will tell you..

regards,

budz
 
my suggestion:

because many things that will cause the plc lost the pulse and false calculation.

budz

What types of things are you referring to? I ask because for many years I've programmed process machinery where the pulse from the flowmeter is vital and provided that it's within the limits of the input, why would it not be seen?
 
Last edited:
I just revering to my experience, i take the pulse from the flowmeter and then make the totalizer calculation using the plc.

when i create the totalizer program in plc using many references, the totalizer value in the plc will always different compare with the totalizer value in the flowmeter it's self.

*note: the flowmeter had been calibrated from the vendor.

maybe due to my lack experienced, need many things to learn.

cmiimw

:D
 
Hi,

What is the best way of totalizing flow, number 1 or 2?

1. Using a flow-meters built-in totalizer pulse, that will pulse for say every 10m3. Then you only count pulse and multiply with some conversion factor.
What if the PLC lose pulses? (using profibus and no speed counter input, task interrupted, etc)

2. Using this formula: Total = Total + (Flow / TimeConversion) * TaskPeriod.
The risk with this method is that you need to be aware of adding small numbers in Real format.

Any Thoughts, better methods?

Regards Sac


RE: Method 1 - Unless your pulse is of a relatively low frequency and has significant on-time per pulse, you could encounter problems due to 3 separate issues.

1) Input filter time
2) PLC sweep time
3) I/O updates asynchronous to PLC sweep


RE: Method 2 - You will typically only encounter loss of data from rounding off with FP adds when one of the operands becomes too large. I have encountered this problem even when using a HSC module on high frequency pulses, and therefore, I have developed a routine to work around this problem. It is not an "elegant" solution. It involves subtracting (for example) 1000 from the primary accumulator value whenever the accumulator exceeds a value of 1000 and simultaneously incrementing a counter (or an add function) whenever this occurs. To display the accumulated value, I then sum the primary accumulator + (counter accumulator * 1000). While I still get a small rounding error with this method, the error is not accumulative, as it would be if I allowed the primary accumulator to round off with every addition.
 
you better just take the data from the totalizer (flowmeter), and then transmitted to PLC using Modbus or Ethernet.

budz

I wonder what magic smoke the totalizer uses so that it never encounters an error?

Seriously, there are only two issues if the meter is calibrated to "X volume per pulse". You could loose the signal from hardware or wiring failure, which would affect any exernal totalizer or PLC equally. Or, you could have the pulses of a high enough frequency that the PLC input would miss them - a problem readily solved by picking the input to meet the requirement. I find it hard to think that a high speed counter input, available from most suppliers, won't keep up with a flow meter pulse.
 
I wonder what magic smoke the totalizer uses so that it never encounters an error?

Seriously, there are only two issues if the meter is calibrated to "X volume per pulse". You could loose the signal from hardware or wiring failure, which would affect any exernal totalizer or PLC equally. Or, you could have the pulses of a high enough frequency that the PLC input would miss them - a problem readily solved by picking the input to meet the requirement. I find it hard to think that a high speed counter input, available from most suppliers, won't keep up with a flow meter pulse.


I agree. However, if poor engineering practices are used in the system installation, then improper grounding and/or electrical noise could generate false pulses or mask actual pulses from the instrument.
 
I agree. However, if poor engineering practices are used in the system installation, then improper grounding and/or electrical noise could generate false pulses or mask actual pulses from the instrument.


But surely those types of faults will be ironed out in the commissioning stage to leave a solid system at the end. You could say the same thing about anything within an installation; If you know it's going to be a problem, fix it. I can't believe there is anybody that would avoid using a pulse from a flowmeter just in case noise affects the input.
 
I have developed a routine to work around this problem. It is not an "elegant" solution. It involves subtracting (for example) 1000 from the primary accumulator value whenever the accumulator exceeds a value of 1000 and simultaneously incrementing a counter (or an add function) whenever this occurs. To display the accumulated value, I then sum the primary accumulator + (counter accumulator * 1000). While I still get a small rounding error with this method, the error is not accumulative, as it would be if I allowed the primary accumulator to round off with every addition.

I totally agree with Bit_Bucket. I have carried out a small research.

1. I have written an Excel's macro to define the Machine's Epsilon (ε) and I have received the result: 2,22044604925031e-16
For Single and Double numbers the result is identical. It means CPU (i.e. hardware) has been used by Excel (i.e. operating system & software) the same way for both kind of numbers.

2. The same algorithm was working in S7-318 gave following result : 5.960464e-008

These results are terribly different! S7 computes worse than PC in 268435434,493553 times.

The algorithm of definition of ε is taken from Forsythe G., Malcolm M., Moler C. [1977] Computer Methods for Mathematical Computations.
 
Let's do a reality check. A really top notch flow meter is going to be accurate to +/- 0.01% That's +/- 1e-4. And that is assuming the installation is good (enough straight pipe, uniform flow profile, etc.) and the calibration hasn't drifted, and so on.

So, is the difference between 1e-8 and 1e-16 really going to be significant? Don't confuse precision with accuracy.
 
But surely those types of faults will be ironed out in the commissioning stage to leave a solid system at the end. You could say the same thing about anything within an installation; If you know it's going to be a problem, fix it. I can't believe there is anybody that would avoid using a pulse from a flowmeter just in case noise affects the input.


I certainly wouldn't do that. I was merely referring to the fact that all projects are not new installations. If a contractor attempted to employ this pulse reading scheme within an existing system using spare cable to connect the instrument, it would be possible to encounter such a problem. Of course, any such problem can be resolved, assuming that one is aware that the problem exists and is willing and able to take the required corrective measures.

I have seen noise problems with instruments being installed in close proximity to an AC motor that is driven by a Variable Frequency Drive, for instance. The source of such problems are not always blatantly obvious and may require advanced troubleshooting skills to isolate and correct.
 
I wonder what magic smoke the totalizer uses so that it never encounters an error?

Seriously, there are only two issues if the meter is calibrated to "X volume per pulse". You could loose the signal from hardware or wiring failure, which would affect any exernal totalizer or PLC equally. Or, you could have the pulses of a high enough frequency that the PLC input would miss them - a problem readily solved by picking the input to meet the requirement. I find it hard to think that a high speed counter input, available from most suppliers, won't keep up with a flow meter pulse.


Seriously, there is a third issue to consider. Not every facility operates with an infinite budget. If integrating the total flow volume via an existing flow rate analog input signal using logic in the PLC returns adequate results, then the expense of installing a new flow meter with a pulse output and a high speed counter module to read the pulse could not be justified.
 
Seriously, there is a third issue to consider. Not every facility operates with an infinite budget. If integrating the total flow volume via an existing flow rate analog input signal using logic in the PLC returns adequate results, then the expense of installing a new flow meter with a pulse output and a high speed counter module to read the pulse could not be justified.

Good point. You can add value to a flowmeter analog input by adding a simple flow totalizer, what client doesn't like something for virtually nothing.
 

Similar Topics

Compactlogix controller, program has 28 conveyors that use TON's to start the conveyors. The TT sounds a warning horn during start and the DN...
Replies
10
Views
489
I have S7 1512C controler for controlling 48 PID temperature loop, the output is PWM. Please I need the best, most efficient way to write the...
Replies
13
Views
606
I am going to need to use HART multi-drop in order to handle a series of Vega Radar units. There are a lot of options and I'm wondering what...
Replies
3
Views
255
Out of interest, I'd like some thoughts on what would be considered best practice with regards to a 2-position turntable control scheme (see...
Replies
17
Views
1,144
Hello colleagues Anybody knows, what could be the best or a better option to bring with you when you are in service at factory to connect via...
Replies
1
Views
263
Back
Top Bottom