T O P I C R E V I E W |
jack1974 |
Posted - 09 Aug 2005 : 23:16:35 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" |
1 L A T E S T R E P L I E S (Newest First) |
quinncurtis |
Posted - 10 Aug 2005 : 08:50:56 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. |
|
|