Quinn-Curtis Forums
Quinn-Curtis Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Tools for Microsoft .Net & .Net Compact Framework
 Real-Time Graphics Tools for .Net (VB and C#)
 RTNumericPanelMeter
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

jack1974

10 Posts

Posted - 09 Aug 2005 :  23:16:35  Show Profile  Reply with Quote
Sorry about posting in the wrong forum last time. I ask this question earlier and I understand how you got the conversion if you are trying to scale the A/D count when the numbers are 0 to whatever, but how do you do it when you want the min range of the Raw data to equal -3 for example and the max range of the raw data to equal +3 and the numbers in between to follow suit.


"Using C#
I am reading from a data collector that sends a signal of values between 2048 and 4095 A/D counts. I have the bar graph scaled correctly, so that it reads how I want it to read(example 0% to 100%). The problem that i am having is how to get what i have it scale to, to be displayed on the RTNumericPanelMeter instead of it displaying the A/D counts"

quinncurtis

1164 Posts

Posted - 10 Aug 2005 :  08:50:56  Show Profile  Reply with Quote
Converted_Value = min_phys + (max_phys - min_phys) * (value_A/D / (max_A/D - min_A/D))

If the raw A/D range of 0-4095 maps into physical coordinate range of -3 to +3, the conversion equation is

Converted_Value = -3 + 6 * ( Raw_A/D_value/4095.0)

If you still have questions regarding these types of conversions you need to contact your A/D board manufacturer for additional help.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Quinn-Curtis Forums © 2000-07 Quinn-Curtis, Inc. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.07