LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Voltage Measurement with cDAQ-9178 and an NI9237 Module

Hello Guys, my issue is as follows.

I have connected my pressure sensor to my laptop via an NI9237 module and the cDAQ-9178 chassis. My LabView program is able to successfully read and record the pressure. However, at the beginning, when there is no pressure applied, the display consistently shows an offset of around 18 MPa. Therefore, I would like to only read the voltage of the pressure sensor, while the conversion is automatically handled within my VI through a 2-point calibration. Consequently, I would like to know if it's possible to use my NI module and LabView to only read the voltage without calculating the pressure?
I've used the example VI "Bridge Continuous Measurement" and set the input to "Pressure," but whenever I try to change other settings, I receive an error message indicating that my module does not support this.The datasheet for the pressure sensor P3MBP, which is being used, is attached in the appendix.
I thank you in advance
   
best regards, Jonas

0 Kudos
Message 1 of 9
(1,256 Views)

Hi Jonas,

 


@Jonas29 wrote:

My LabView program is able to successfully read and record the pressure. However, at the beginning, when there is no pressure applied, the display consistently shows an offset of around 18 MPa. Therefore, I would like to only read the voltage of the pressure sensor, while the conversion is automatically handled within my VI through a 2-point calibration. Consequently, I would like to know if it's possible to use my NI module and LabView to only read the voltage without calculating the pressure?


18MPa=180bar offset, quite a lot even for 5 to 15 kbar sensors…

 

You can apply the "2-point calibration" also on the pressure values, by scaling from (example) 180…4900bar to 0…5000bar. Why do you even want to get the (milli)volt readings?

 

(Btw. the voltage readings of a bridge-type sensor depend on the voltage/current supply of the bridge. You need to take that into account as well when operating on the voltage level.)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 9
(1,244 Views)

Hi GerdW,

We wanted to obtain the voltage readings so that we can potentially establish our own calibration using a pressure gauge. Previously, on another device, we used a tare function to eliminate this offset. However, even if we don't eliminate this offset, in the previous setup and in the new LabView program the displays show the same measurement value. The pressure also starts to increase only when we actually reach a pressure above 18 MPa; before that, only the offset is displayed.

 

Best Regards,

Jonas29

0 Kudos
Message 3 of 9
(1,219 Views)

Hi Jonas,

 


@Jonas29 wrote:

We wanted to obtain the voltage readings so that we can potentially establish our own calibration using a pressure gauge. Previously, on another device, we used a tare function to eliminate this offset. However, even if we don't eliminate this offset, in the previous setup and in the new LabView program the displays show the same measurement value. The pressure also starts to increase only when we actually reach a pressure above 18 MPa; before that, only the offset is displayed.


From the documentation I only see readings/specs in mV/V, so you should be able to read the bridge output with respect to excitation voltage.

 

When your DAQmx task "only measures starting from 180bar" then there is something wrong. How did you define the mV/V conversion to pressure values? (Mind to share your VI, downconverted to LV2019?)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 9
(1,213 Views)

Hi GerdW,

Here is the VI for my pressure measurement and a screenshot of my Inputs. I also tried increasing the first electrical value to set the value in the graph to zero, but then the value is smaller than the actual pressure, when the pressure is increased.

 

Download All
0 Kudos
Message 5 of 9
(1,162 Views)

Hi Jonas,

 

on your VI:

  • Don't use a TimedWhileLoop to handle DAQmx tasks! Use a simple while loop and let DAQmx do the timing, especially in ContinuousMode!
  • Don't fiddle with buffer size (at DAQmxTiming) in ContinuousMode: read the complete help for that function…
  • Why do run the PtByPt-Mean in "initialize mode" all the time???
  • What's the point of reading N samples when you only use the very first one???
  • Are you sure about your scaling options? In the image you scale 1mV/V to 1000Pa, in your VI you scale 2mV/V to 100psi? What do you expect from sensor?
  • Never delete the labels of frontpanel elements! You may hide them…

(See the attachment for some improvements.)

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 9
(1,155 Views)
Spoiler
Hi GerdW,

Thank you very much for the help and tips, but the issue was that I was getting far too many data points and I only need one per second. That's why I increased the buffer and calculated the averages because otherwise my VI wouldn't work. Reducing the sample rate actually didn't change anything.

The scaling options in the screenshot are the ones I'm using; the others are just the default settings when I open the VI. However, I'm not 100% sure about the mv/V setting because the pressure sensor only states that 1mV/V corresponds to 1000 MPa, and the rest I got from the datasheet I attached in the first message.

Do you know if it's possible to read the voltage using my setup, or is this impossible? If so, I'll need to look for an alternative way to identify the cause of the offset.

Best regards,
Jonas29


0 Kudos
Message 7 of 9
(1,148 Views)

Hi Jonas,

 


@Jonas29 wrote:
Thank you very much for the help and tips, but the issue was that I was getting far too many data points and I only need one per second. That's why I increased the buffer and calculated the averages because otherwise my VI wouldn't work. Reducing the sample rate actually didn't change anything.

The scaling options in the screenshot are the ones I'm using; the others are just the default settings when I open the VI. However, I'm not 100% sure about the mv/V setting because the pressure sensor only states that 1mV/V corresponds to 1000 MPa, and the rest I got from the datasheet I attached in the first message.

Your NI9237 offers a limited set of possible samplerates: read the fine manual!

So you better read samples at ~1.6kS/s and use the mean function to "decimate" to your desired samplerate…

 

According to the datasheet your sensor offers an output of 1mV/V for it's full-scale input (you didn't mention the measurement range of your sensor, but I guess it's 10kbar), so the scaling should be 1 mV/V electrical to 1000 MPa (or 10E6 Pa).

(Do you know you can set meaningful default values for your controls?)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 9
(1,144 Views)

Thank you for the tips. I only started programming in LabView and working with NI devices a few weeks ago. That's why I still have quite a few comprehension issues and I'm trying to properly configure and set up the devices.

0 Kudos
Message 9 of 9
(1,132 Views)