LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

sampling parameters suggestion

    I have to input 3 channels of EKG signal to PC, using NI-DAQPad 6015 and NI-DAQmx. I need to create program as simple as possible, and it is base on some examples provided with LabVIEW.. Simpe DAQ with one while loop. I need a clear explanation and suggestion about two parameters>
sampling rate (DAQmx Timing vi) and samples to read (DAQmx Read vi). What do you suggest about this two parameters and what are the connection between them (if any) and what is the REAL meaning of them.. what do I control with one and what with another...
0 Kudos
Message 1 of 3
(2,696 Views)
Hello Sir,
                I would like to share the knowledge that I've gained earlier.  First,  Sampling Rate is one of the charateristics of your DAQ board which is represented in terms of Samples Per Second.  If I remember correctly, in the process of converting analog values to digital values the minimum sampling rate should be twice the frequency of your signal. Now, Samples to Read is represented as Total number of samples that you wish to acquire. Acquisition period is totally based on these two parameters.

i.e. Acquisition Period = Number of Samples (Samples to Read) / Sampling Rate.

So, if you wish to acquire 1 Million Samples (Number of Samples) @ 10 Million Samples Per Second (Sampling Rate), your acquistion period would be

1 Million / 10 Million = 0.1 seconds (or) 100ms.

I hope I gave you a little idea about the parameters Smiley Happy
Thanks for giving me the chance to share this. Good Luck! Smiley Tongue
0 Kudos
Message 2 of 3
(2,672 Views)
 

Hey there Starcha,

To clarify for you here is what each of those VIs is for:

DAQmx Timing: This sets of all of the timing parameters of your task (i.e. acquisition). Timing parameters such as if you are doing a finite acquisition, or a continuous one, what sample rate you are acquiring at if you are doing hardware timed, things of this nature. Basically everything involved how you are acquiring things in relation to time.

DAQmx Read: This actually reads the values of you acquisition into LabVIEW and gives them to you. So if you were doing a hardware timed, continuous acquisition and thus buffering all of you readings, this VI would go in and grab a specified number (Samples to Read) of samples out of the buffer and import them in to LabVIEW so that you can do with them what you want.

You can find out the specifics of what each input and output mean for these VIs by using the context help (Ctrl-H to enable) and over you mouse over the VI in question, then press "click here for more..."

Generally both these VIs are called when setting up a DAQ task. You will set up the timing VI first, then down the line when you are reading to read some values into LabVIEW then you will use the read VI.

What Kay said is correct if you are doing a finite acquisition, but not the case if you are doing a continuous acquisition. If you are doing continuous acquisition then Samples to Read sets the number of samples to grab out of the buffer every iteration of that DAQmx Read (which will be in a while loop).

I hope that this clears things up for you, and answers you questions. If any of that was unclear or I didn't answer your question feel free to post back here.

Best of luck,
-GDE

 

 

0 Kudos
Message 3 of 3
(2,653 Views)