LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to convert the binary data to actual physical units ?

Hi !
I am acuqiring some physical signals like force on the AI channels.The recorded raw binary data does not convey any information. How can I convert these numbers to physical units say Newton or mm etc. ?

-Shiv
0 Kudos
Message 1 of 3
(4,568 Views)
Shiv,

Converting raw binary data to engineering units requires three known items: the resolution of the board (12-bit, 16-bit, etc), the range of the analog to digital converter (+/- 10V, +/- 5V etc) and the sensor output (for example, a pressure transducer may be 500 PSI per volt). It follows that

binary value/resolution * range = volts

volts * engineering value per volt = engineering unit

For the pressure transducer above with a 12-bit board at a range of +/- 5 volts, let's say a value of 1320 decimal. Therefore,

1320/2048 * 5 = .8057 volts

.8057V * 500 PSI / Volt = 402.8 PSI

Now, a few things come to mind. First, why did I use 2048, when 2^12=4096 (12-bit board)? If the range is +/- 5 volts, the NI boards use the most significant bit
for the sign, so the resolution is actually 2^11. If the range had been 0-10 volts, that would not be the case.

Second, why did I multiply by 5, when the total range is actually 10 volts? Simply put, the 2048 bits are only for a 5 volt range, either the positive or negative.

Hope that explains how to get the binary data you have into engineering units. After you get the value into the unit the sensor is calibrated to, you can convert it to any other value (i.e. mm to inches, kg to lbs, etc). I used the most complicated scenario.

Mark
0 Kudos
Message 2 of 3
(4,568 Views)
Oops, typed on my calculator wrong, and let me redo my example. This is less confusing.

1320/4096 * 10 = 3.223 Volts

3.223 V * 500 PSI/Volt = 1611.33 PSI

The above is still true about the most significant bit being the sign, but if you divide by 4096 and multiply by 10, that's the same as dividing by 2048 and multiplying by 5. Therefore, just forget all that other stuff. Sorry for the confusion.

Mark
0 Kudos
Message 3 of 3
(4,568 Views)