Re: How to get the totalizer value from analog input

Automation, Control, Data Acquisition, and Remote Applications

How to get the totalizer value from analog input


vietthum 05-22-2007, 8:54 AM
Hello,

I am the newcommer with OPTO22.
I use SNAP-PAC-R1.

1. I want to get the totalizer value from analog input (flowrates) from a flow meter. How to do it?

2. I want to get the totalizer value from Digital input from Pulse of flow meter. And I want to calculate the flowrates from this Pulse input. How to do it?

Could any one help me please?
Above 02 question can be solved in SNAP-PAC-R1?

Thanks & Best regards,
Nguyen Vinh Loc

Re: How to get the totalizer value from analog input


Fuji 06-15-2007, 1:36 PM
I found that the easiest way to totalize water flow was to use pulse counting.. as you have listed as your second point. If your flow meter has an open collector output - make sure the supplied voltage is within the range of your digital input card. Other than that, you just need to write a simple strategy to apply your multiplication factor.


And yes.. the R1 can perform high speed counting.

Re: How to get the totalizer value from analog input


Barrett 06-26-2007, 9:46 AM
If you still need help on this, let me know.
You have to keep in mind that the accuracy of you input is relative to how long a period you count before clearing and restating the count in the module before you pull the count in for the math conversion. The amount of counts versus the fraction of pulse you actually do not recieve in the process of retriving the count. You can also use pulse for rate but this is sensitve to the pulse rate and if you do this, you should condsider using two input points on a "Fast" module and use one for counting and the other for pulse period or freq to get the rate input. barrett@automateco.com

Re: How to get the totalizer value from analog input


Kiwi 06-26-2007, 4:48 PM

Hi,

   A simple way of intergrating an analog input is to Set up a timed instruction to add the input value every few seconds to a variable. e.g. if you have a flowmeter FT-XXX range 0-100 L/m and supposing the flow is at 45 L/m and your instruction executes every 6 seconds.

Divide FT-XXX by 10 (60/6=10 times per minute) and your instruction adds 4.5 to the variable every 6 seconds (4.5 x 10 = 45)

Of course you don't have to use 6 seconds you would get the same results by 45 / 20 every 3 seconds.

It's also easy to change your units for example Liters to M3     FT-XXX/10,000 every 6 seconds would give you 0.045

The main thing is to make sure your timer is accurate, use the real-time clock  with a "GetSeconds" instruction rather than just a timer or wait instruction

It can be a little tricky but its easy to test by using a dummy variable in place of the flowmeter.

If your flow is very eratic, you may need to include a filter to smooth it out.

Hope this helps

Roy 

Re: How to get the totalizer value from analog input


nvl 09-04-2008, 7:50 AM

I make a flow chart with an up timer with 1 second. The totalizer is accurate in short time, just few minutes.

But the error will be bigger in long time. I found that:

There is a small time delay since the controller knows the up-timer is expired to the time it starts the up-timer again.
==> the actual total time for totalizing is = up-timer value + small time delay.
==> it causes the error.

and the problem is we can not count this small time delay. It varies, from 3 to 5ms. if it is constant, we would compensate for error.

==> do you know how to fix this small time delay?

In other words, do you have any other technique for totalizing a float value (not only analog input)? It must be accurate technique.

Powered by Community Server, by Telligent Systems