Other Software

Started by vietthum at 05-22-2007 9:04 AM. Topic has 1 replies.

Print Search
Sort Posts:    
   05-22-2007, 9:04 AM
vietthum is not online. Last active: 4/5/2007 11:19:42 PM vietthum

Top 150 Posts
Joined on 04-05-2007
Posts 2
How can I get the totalizer value from analog input?
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
   Report 
   04-04-2008, 8:19 AM
awilde@awpi.biz is not online. Last active: 4/4/2008 11:05:05 PM AWPI

Top 500 Posts
Joined on 04-04-2008
Posts 1
Re: How can I get the totalizer value from analog input?
1. You will need a time delay in your routine so this will be more accurate. A delay of about a second should do the trick. I recommend using a timer vs. just using the Delay command. Set an UpTimer with a target of 1 second. When that value has been reached, use the equation UpTimer / 60 x Analog = Totalizer. Add this Totalizer to a running total. Then reset your UpTimer.

2. For this you will need a delay as well. Using an UpTimer as well, use a delay of a couple seconds. The accuracy of this will depend on the pulse rate and the time delay you have chosen. Higher pulse rates may exceed the digital input scan rate. Get & Clear Counter. I then like to Start Counter just in case it stops for any reason. Then multiply your pulses (Counter) times your rate. Add it to a Totalizer. For the rate, Multiply the Counter value you just got by the Uptimer divided by 60 (Rate = Counter * Uptimer / 60).

Both responses assumes flow rates of per minute. The Uptimer itself is used in the equation to make the result more accurate. Using a DownTimer or the UpTimer Target in the equation won't account for the time elapsed since the UpTimer Target was reached.
   Report 
OptoForums » Product Forum » Other Software » How can I get the totalizer value from analog input?

Powered by Community Server, by Telligent Systems