From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to convert voltage to a physical units

Solved!
Go to solution

Hello all,
I hope you are all doing well and safe.
I want to convert voltage to physical units.
I use a sensor of illuminance connected with NI9205:
power supply: 16 40 Vdc
Range: 0.2 20klux
Ouput 0 10 V
the results are displayed in volts and I want them displayed in lux

 

any help please!

 

0 Kudos
Message 1 of 5
(1,153 Views)
Solution
Accepted by topic author dromar2222

The scaling factor will be typically provided in the calibration report.

 

Assuming that 0.2klux is represented by 0V and 20klux is represented by 10V, you can find the rest of the values by the y=mx+c equation (assuming linear scaling)

 

You can compute m by two-point line equation,

m = (y2-y1) / (x2-x1)

m = (20-0.2) / (10-0) = 1.98 klux/V

c is the offset at 0V, which is 0.2klux

 

klux = 1.98 x (voltage) + 0.2

 

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 2 of 5
(1,142 Views)
Solution
Accepted by topic author dromar2222

Maybe this.

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 3 of 5
(1,117 Views)
Solution
Accepted by topic author dromar2222

@santo_13 wrote:

The scaling factor will be typically provided in the calibration report.

 

Assuming that 0.2klux is represented by 0V and 20klux is represented by 10V, you can find the rest of the values by the y=mx+c equation (assuming linear scaling)

 

You can compute m by two-point line equation,

m = (y2-y1) / (x2-x1)

m = (20-0.2) / (10-0) = 1.98 klux/V

c is the offset at 0V, which is 0.2klux

 

klux = 1.98 x (voltage) + 0.2

 


And since you are using a DAQmx device...

 

Create the DAQmx Scale for the channel using a linear Scale with your slope and offset and set the scaled units to kLux!  (The scaling actually happens just a bit faster inside the DAQmx Read call to the underlying dll.)


"Should be" isn't "Is" -Jay
0 Kudos
Message 4 of 5
(1,109 Views)

I appreciate your help. Thank you all

0 Kudos
Message 5 of 5
(1,073 Views)