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.

Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

Building daq system for temp and flow measurement with two NI 9221

Hello, this is my first post. 

I have problems converting measured voltage to temperature and flow rate. 

I'm working on a daq system to measure seven temperatures via thermistors and two fluidflows through fluid driven turbines that output a frequency. More flow, higher frequency. I want to accomplish this with two NI 9221 daqs.  I want to view this data while testing and log this data to analyse later. I'm using labview NXG for the moment. 

The temperatures are measured with thermistors. The conversion from resistance to voltage happens via a 250 ohm shunt, that way i measure current through the thermistor which then converts with a given supply voltage to resistance. I can manage to save voltage data into a tdms file. 
There are 7 measured channels for temperature. To convert measured voltage to actual temperature, I need to perform multiplification, division and addition on the elements in the array that is outputted by the read daqmx block.  I can't seem to do anything else then multiplification. 

I haven't started the flow rate conversion (frequency) yet. 

I have added the gvi file i use for measurement. 

Can anybody set me on the right track? 

0 Kudos
Message 1 of 4
(2,142 Views)

Hi KristofR,

 

Welcome to the forum.

 

I am not quite sure where your problem lies specifically, as I was able to use the add and divide function easily. 

 

If I understood your set-up correctly you would like to have

 

R_T = (V_I * R_S/ V_S) - R_S,

 

R_T = R thermistor

V_I = Input voltage

R_S = shunt resistor

V_S = Voltage drop over the shunt resistor

 

I added that code as an example.

 

Keep in mind that the data is a 2D array and using a scalar for the mathematical operations will act on every element (which is what you want)

What is happening when you are trying the same on your computer?

 

Andreas

 

Andreas
CLA, CTA
0 Kudos
Message 2 of 4
(2,107 Views)

I understand now what went wrong. (beginner mistake) 
 
I connected the read output to the input of the add block.  
I selected the input pin of the add block and created a constant which defaulted to array constant.
I then tried to make the array one row and one column to mimic a numeric constant which worked but the data didn't come out right. 
Didn't work, I found that my 7x100 array (channels x samples per channel ) became all zeros except for the very first element which is quite logical in hindsight.     

I apologise for my inexperience. 

I can now continue adding extra conversion for resistance to temperature and another measurement for flow rate. 

0 Kudos
Message 3 of 4
(2,102 Views)

Hi KristofR,

 

That makes a lot of sense. I also created the constants as you did first, but I immediately realized that they were arrays and replaced them with scalars.

 

No reason to apologize. We all started this way ;).

 

Have fun with the rest of the application.

Andreas
CLA, CTA
0 Kudos
Message 4 of 4
(2,099 Views)