From Friday, January 17th 11 PM CDT (January 18th 5 AM UTC) through Saturday, January 18th 11:30 AM CDT (January 18th 5:30 PM UTC), ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading multiple channels with DAQmx

Solved!
Go to solution

I’m trying to update a VI that was written to read a LVDT and temperature, both of which will be measured as 0-5V. The previous version used some DAQ sample program, that was modified to somehow read the signals.  After the crash of the previous computer, the modified VI was lost forever.  It was suggested to me by NI that I should just redo this part of the VI, because it would be easier than figuring out what the previous user had done. 

  

I’m working with a USB-6008. I use labview DAQmx create channel, and the task goes to a “NChan NSamp 2DBL” DAQmx read.  The data here is read and massaged a bit, and then written to disk and displayed on screen.  

 

My problem is that the VI will only read the 1st physical channel I input. If my physical input channel is Dev2/ai0, the temperature will read, but my LVDT value will be NaN. If the physical input is Dev2/ai1, the temperature will read the LVDT value, and the LVDT will again display NaN. If I use the physical channel input Dev2/ai0:1, both values will show NaN. 

 

The signals check out in Signal Express, so it seems to be more of a software issue. There is another device on Dev1, so that isn't the issue. I’m on Windows 7 with Labview 10.0.1, DAQmx version 9.6. I've attached an image of the block diagram. Thanks in advance for your help.

Message 1 of 9
(9,038 Views)
Solution
Accepted by topic author nht5067

You need to specifiy the timing (sampling rate) and the number of samples per channel.  The NaN probably means that no data was available when you peform the read operation.

 

Something like this:

 

 

>

"There is a God shaped vacuum in the heart of every man which cannot be filled by any created thing, but only by God, the Creator, made known through Jesus." - Blaise Pascal
0 Kudos
Message 2 of 9
(9,020 Views)

Hello .. 

 

I am using NI DAQ USB 6341.. and wanted to multiplex two ECG signals such as lead I and lead II .. I used I/O physical channels - ai0 and ai1 as my input channels and I dont how to connect this further to my DAQ and other circuit which is while loop. 

 

please help me. 

 

Ashwin.

0 Kudos
Message 3 of 9
(8,715 Views)

The exact syntax is shown in the above image so I don't understand what you are confused about. The DAQmx Read must be one of the NChan types.

0 Kudos
Message 4 of 9
(8,710 Views)

Hi.. Thanks for the reply.. 

 

Can you mention me the icon location of DAQ MX with a symbol in square pulse and task out should be connected to DAQ assistant. 

0 Kudos
Message 5 of 9
(8,698 Views)

I'm sorry but that does not make any sense to me. You use either the DAQ Assistant or the DAQmx functions. If you are using the DAQ Assistant, why do you want to connect anything to it?

0 Kudos
Message