LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQ Problem

I am having a DAQ problem that requires an expert.

I am using a USB-6218 to collect 2 seconds of data at 4 khz.  I have successfully used the DAQ Assistant to create and run a task and it exicutes with no problems.  I need to run data collection in the background of other data collection tasks.  To this end I replaced the DAQ Assistant with DAQmx Create Channel, DAQmx Timing, DAQmx Start Task, DAQmx Read (within a loop), and DAQmx Clear Task.  This method worked with a few minor problems that I need to resolve.

When using the DAQ Assistant the signal is on Dev1/ai1 and the collected data matches with what I am seeing on an attached oscilloscope (seperate hardware).  When I use the second method the signal recorded is listed as being on Dev1/ai0 and the magnitude of the recorded signal is about one fourtieth of the actual signal (40mv versus 1.7V).  Additionally the DC voltage of the data recorded by the second method seems to vary despite no changes in the DC level of the actual signal.

Any insight into these differences would be appreciated.

-Mike
0 Kudos
Message 1 of 6
(3,040 Views)
Can you attach a copy of your Daq loop? It sounds like your configuration is looking at the wrong channel and that what you are seeing is being picked up by an adjacent channel. If this channel isn't connected to anything you might see this. Also, try going into the Measurement and Automation Explorer (MAX) that round blue short-cut icon with the National Instruments "eagle" on your desktop. You can run diagnostice on your board, see if what you are seeing in your program cooresponds to what MAX sees.


Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 2 of 6
(3,034 Views)
i agree wit LV pro. why cant you change the channel for recording to Dev1/Ai1?
-----------------------------------------------------------------------------------------------------
... And here's where I keep assorted lengths of wires...
0 Kudos
Message 3 of 6
(3,026 Views)
Sounds to me like you measure the wrong channel and see crosstalk. Make sure your Create Channel.vi uses the correct physical channel.

Felix
0 Kudos
Message 4 of 6
(3,023 Views)
Attached is a copy of the VI in which I am capturing the data.  This is still in developement and is therefore a little rough around the edges.  I have fixed the problem, but I do not know why the solution I used worked.

When I had the signal physically attached to Dev1/AI1 the method of using the DAQmx VIs only produced a signal when it was set to Dev1/AI0 (as in the attached VI).  I tried setting the channel to all other s on the DAQ and got only noise, max, or min readings.  The signal seen was degraded in magnitude and the DC bias varied with time as indicated by my origional post.

I switched the physical wire to Dev1/AI9 and now the DAQmx VI method produces the same result (when told to read Dev1/AI9) as the DAQ Assistant method.

Is there any reason why Labview or the DAQ would have some sort of crosstalk issue between Physical channels AI0 and AI1?

Also, Is there a way to read samples from the DAQ buffer using the DAQMX Read without clearing the buffer?

Thanks for the help.

-Mike
0 Kudos
Message 5 of 6
(2,996 Views)
 

Hi Mike,

I took a look at the attached VI and I just wanted to make some recommendations and clarifications.  First, I understand that you seem to be having crosstalk between ai0 and ai1.  You also said that you have now connected the physical wire to ai9 and also set the channel to ai9 in LabVIEW.  First, what type of signal are you trying to read; is it a floating signal or is it ground referenced?  The reason I ask this is that I noticed in your VI, you have set the input configuration to differential.  This Developer Zone article explains noise considerations and the differences between hooking up signals with differential, RSE or NRSE modes.  If you want to measure differential, your channel count will be cut in half because you would use two channels for each measurement.  For instance, if you wanted to measure ai0, the + wire would be connected to ai0 and the - lead to ai8.  ai1 then goes with ai9.  This could be the issue if you were measuring from ai9 and trying it with the wrong configuration mode.  In the document that is linked above, Table 1 explains the signal source and the input configuration and gives recommendations when hooking up signals.

Other than that, your VI looks like it will work.  I will second what Putnam Monroe said about using Measurement and Automation Explorer to test your signal.  If you go into Devices and Interfaces and choose your USB-6218, you can run a test panel with Analog Input to see if the signal is correct.  This way you can test the hardware and connections before worrying about the LabVIEW programming.  Hopefully this information was helpful!

 

Regards,
Vanessa L.
Applications Engineer
National Instruments
0 Kudos
Message 6 of 6
(2,971 Views)