LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Getting continous voltage in labview

hello everyone,
I am using NI 9219 (cRIO) to measure height from Analog p60 wire sensor. This sensor works like a potentiometer so i have to measure continuous voltage from my NI 9219.I have created several VIs to get that output but i am not getting anything. All I am getting are random values. Then I tried to connect channel 1 of 9219 directly to a external voltage supply. I varied the voltage between 0 to 4 volt. But it wasn't working as well.
I am attaching some of my VIs. It would be great if anyone can let me know what mistake I am making in my VI.
Download All
0 Kudos
Message 1 of 11
(2,784 Views)

Hi JAHRA,

 


@JAHRA wrote:
I am using NI 9219 (cRIO) to measure height from Analog p60 wire sensor. This sensor works like a potentiometer so i have to measure continuous voltage from my NI 9219.I have created several VIs to get that output but i am not getting anything. All I am getting are random values. Then I tried to connect channel 1 of 9219 directly to a external voltage supply.
I am attaching some of my VIs. It would be great if anyone can let me know what mistake I am making in my VI.

How did you wire your sensor to the NI9219? Did you follow its datasheet?

 

On your VIs:

"test":

The DAQmx task definition is don ein MAX, so we cannot determine your settings. The loop runs as fast as possible (which is bad), you are trying to read "N samples", but you don't specify the number of samples (which is unusual)…

"test2":

Now you are using the DAQAssistent with some unusual sample rate settings: do you really want to wait for ~5s before you get some data presented? The loop cannot be stopped…

"Height":

Here you don't read any data from the DAQ device, but instead you (try to) write data to an analog input, which is pure nonsense…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 11
(2,779 Views)
Hello,
 
Thank you for your reply.

For "Test":
I am attaching the picture of DAQmx task.
JAHRA_0-1595233010635.png

 

 
For " height"
 
Yes it is nonsense but i got this VI in a section of NI Labview core 1 training. So I thought to give try with the same one. 
JAHRA_1-1595233010655.png

 

 
I am providing 5V supply voltage to the sensor and acquiring output of sensor with NI 9219. It would be very kind if you could suggest me a possible solution. 
 
Best Regards, 
Nisatuz Jahra
0 Kudos
Message 3 of 11
(2,761 Views)

Hi JAHRA,

 


@JAHRA wrote:
I am providing 5V supply voltage to the sensor and acquiring output of sensor with NI 9219.

Is there one wire from sensor to NI9219 or two wires?

Which pins of the NI9219 did you connect to the sensor output?

Which page/chapter of the manual (see previous message) did you follow when wiring the sensor?

Best regards,
GerdW


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

From the sensor two wires are connected to NI 9219. One wire is the signal and another is ground. The signal's wire is connected to pin 4 and ground is connected to pin 5 of the channel of NI 9219.

 

From the training Labview core 1> working with groups of data >voltage ramp.

 

Best Regards,

Nisatuz Jahra

0 Kudos
Message 5 of 11
(2,749 Views)

Hi JAHRA,

 

what do you measure at the sensor output using a simple (handheld) DMM?

What do you measure when you connect a simple AA alkaline cell to the NI9219?

Best regards,
GerdW


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

I used DMM to see what is the output voltage I am getting from the sensor. For example, with supply voltage is 5v i was getting 0.14volts from the sensor in initial position. Then i took some random values by changing the position of the height sensor. In 5cm i got 0.31 volts, in 10cm i got 0.66, in 15cm i got 1.06. All these values i could measure from DMM but not from my VI.

 

I did not connect any AA alkaline cell with NI 9219, but i connected it with a power supply and vary it from 3 to 5 volts and checked the channel voltage with a simple VI.I could see the voltage variation in this VI. I am sending the picture of simple VI if you want to see.

 

 

 

Best Regards,

Nisatuz Jahra

0 Kudos
Message 7 of 11
(2,723 Views)

Hi JAHRA,

 

which cRIO target do you use?

Most of them don't support DAQmx, but need to use either the ScanEngine (as in your last image) or the FPGA built-in into those targets…

Best regards,
GerdW


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

Hi,

The cRIO target is NI cRIO 9104 along with 9104 chassis.

 

Best Regards,

Nisatuz Jahra

0 Kudos
Message 9 of 11
(2,711 Views)

Hi Jahra,

 

the 9104 is a deprecated device, which does not support DAQmx.

Use the ScanEngine!

Best regards,
GerdW


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