ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Various ways of obtaining multiple analog inputs on DAQ

Hi there... been a while since I last posted. I will be taking the NI exam this week and this concept (or more like semantics of LabVIEW) is confusing me yet again. And it is as simple as addition, but my mind doesn't seem to wire up right.

 

I am still a little dazed by the method of obtaining analog inputs (Although I have it working in my application) and the various READ options available. Like 1 Channel 1 sample, 1 channel N sample, N channel N sample, N channel N sample Wfm etc. To add to the mix, what confuses me more is the number of samples to READ and buffer.

 

I am just not able to SEE how values are read  and displayed on front panel and what values are replaced in the buffer etc. Are there any examples that show clearly the different READ options available? I would really appreciate it. I really want to see how data flows, so that in future for an application, I can process the requirement in my head and then program it.

 

I hope I have my question clear.  PLease let me know. Thanks a ton!!

 

V

I may not be perfect, but I'm all I got!
0 Kudos
Message 1 of 5
(2,976 Views)

Hello VeeJay,

 

What exam are you taking? Good for you! So here is something that I think you might find helpful:

 

So depending on your acquisition, if it's continuous or finite samples. But let's say you have set your timing to finite samples.

 

  • 1 Channel 1 Sample: This gives you just one sample of that channel you are reading.
  • 1 Channel N Samples: You set the number of samples you want to read on your DAQmx Read vi and the output of this is a 1 D Array of data coming from the channel you are reading.
  • N Channel 1 Sample: The outcome here will be a 1 D Array, in which each element of the array represents one sample of the different channels you are reading.
  • N Channel N Samples: The outcome is a 2 D Array whre each row represents a channel and the columns are the samples (You set the number of samples in the DAQmx Read VI).

The difference between waveform and 2D DBL is how you want to present the data on the front panel, if you select waveform you can set it to plot a chart or a graph.

 

The samples to read are stored in the buffer. Depending on your timing, if it's finite samples then the samples to read and the buffer are the same size, but if you have set it up to continuous sampling then the buffer auto sets to a different value.

 

In a way to explain to you how the data flows I could try to explain it to you this way:

The data is acquired from the DAQ, depending on your rate, then it's passed to the buffer of the DAQ, then it goes to the PC Buffer and finally to LanVIEW Buffer, at this moment the data is being presented on the front panel. 

 

My suggestion would be for a better understanding on how the different options for reading work is to simulate a device on the Measurement & Automation Explorer, and afterwards program on LabVIEW a simple DAQmx acquisition task so you can see the different behaviors of this.

 

Best regards,

Miriam
Field Applications Engineer
NI Colombia
CLD
0 Kudos
Message 2 of 5
(2,961 Views)

I hope you searched the forum before coming here.

Take a look at one my Previous post related same topic here....http://forums.ni.com/t5/LabVIEW/Samples-to-read-option-in-DAQ/m-p/1741230#M610093

0 Kudos
Message 3 of 5
(2,958 Views)

Thank you both for your help. I guess I understand what gets done, but not how it gets done. Again, I get 1 channel 1 samples means as is and so is N channel 1 sample And transfer from DAQ to buffer etc.

My main concern is with respect to sample rate, number of samples on timing vi, number of samples to read on read vi, (#channel #sample) option on read vi and LOOP time.. THese are the variables that individually I understand, but put them together in a simple program, I am befuddled. I have posted this question before as well. Thanks!

I may not be perfect, but I'm all I got!
0 Kudos
Message 4 of 5
(2,932 Views)

VeeJay,

 

Have you checked the examples that come with LabVIEW? To be honest, running them and observing their behavior is the best way to understand this. If you know all these concepts individually then when you see a code running it's easier to get the idea of how it really works.

 

If you go to http://www.ni.com/code there are many other examples there that you can find useful.

 

Regards.

Miriam
Field Applications Engineer
NI Colombia
CLD
0 Kudos
Message 5 of 5
(2,911 Views)