Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

NI-DAQmx task works in MAX or DAQ Assistant test panel but not in LabVIEW

I am attempting to read a single AI channel from a PCI-6024E card via an SCB-68. I have created a NI-DAQmx Analog Input Voltage Task in MAX for this channel, sampling in contiuous aquisition mode at 100 kHz, 10000 samples at a time, with RSE terminal config. If I use the Test feature from MAX, the channel acquires data as expected.

In LabVIEW, I call this task using an DAQmx Task Name Constant. If I right-click this constant and select "Edit Task", the Daq Assistant opens and I can use the Test feature from the DAQ Assistant to see that the data is still being acquired as expected.

However, when I try to programmatically read this channel in LabVIEW using the VI "DAQmx Read (Analog Wfm 1Chan NSamp).vi", the VI returns a constant DC value of 500 mV, which I know is incorrect (I can monitor the signal across the two terminals in the SCB-68 with a DMM to know that the signal coming in varies as expected, and as I read using the test panels). This erroneous reading occurs even if I make a new VI, drop the task name constant on the diagram, right-click the task name constant and select "Generate Code - Example" and let LabVIEW create its own acquisition loop (which is very similar to what I already set up, using the "DAQmx Read" VI).

Any ideas why the Test Panels work correctly but the LabVIEW code does not?
0 Kudos
Message 1 of 3
(2,701 Views)
Unfortunately I have no idea but if you show task file and VI, maybe I can tell you any advice.

d_touch
0 Kudos
Message 2 of 3
(2,685 Views)
Hello bentnail,

I'm not sure why the test panels are readin the value correcly but the LabVIEW code does not, but there are a couple of things we can try.

1) What happens if you just use the DAQ Assistant and place it on the block diagram? Does it read out the correct values?
2) Try running a shipping example that comes with LabVIEW. "Acq&Graph Voltage-Int Clk.vi" should work well.
3) What kind of signal are you expecting to read (peak to peak voltage, freqeuncy, etc.)?

Thanks,
E.Lee
Eric
DE For Life!
0 Kudos
Message 3 of 3
(2,675 Views)