From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, 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: 

sampling rate

Hi everybody,

               I need some ideas to work with sampling rate, here i have some doubts.

1. I was acquiring a voltage signal from daq device usb 6211 with rse configuration mode and i have added sapling clock to acquire a samples of 10 per second per channel but i don't think it was getting a 10 samples per second per channel, instead of that it takes 10 seconds to acquire next set of samples to acquire.

2. My questions is that sampling rate which denotes no. of rate of samples to acquire per second per channel or it will be used to set for time delay to acquire a samples.

as i am a new to this labview, need to know about this important thing,

Thank you in advance,

regards,

Dinesh

0 Kudos
Message 1 of 12
(3,428 Views)

It would help us if you posted you code.

 

The Samples Per Second is the sample rate that the hardware will sample at.  So with 10 S/sec, you will get a sample every 100ms.  What you are probably seeing is you set the sample count to 100.  With that setup, you are reading 100 samples every 10 seconds (100 S / 10 S/sec = 10 seconds).


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 12
(3,418 Views)

hello,

  i have created a vi to explain what i want? i need much more concept about sampling rate i need some idea to get started to work with sampling rate.

thanks in advance,

Regards,

Dinesh

0 Kudos
Message 3 of 12
(3,386 Views)

The sample rate you give to the DAQmx Timing VI is in Samples/Second.  It will take care of the "per channel" part.  You do not have to worry about that.  So if you want your channels to be samples at 10S/second, you just put in 10 for the rate.  You will also want to set the Sample Mode to Continuous.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 12
(3,331 Views)

Hi crossrulz,

         I have done using the sampling rate and when i was going to save it in a csv file, it was not working at all, could you give any suggestions for that? and also i need to display the channel values in the XY graph i mean channel 1 vs channel 2 but i would like to display the acquiring data with a time(sec) in a X-axis and i have done it using a multiple channel multiple samples mode when i tried to acquired it for multiple channel single sample, i little messing up the code any suggestions for that too?

0 Kudos
Message 5 of 12
(3,287 Views)

Attach your code so we can figure out what you are doing wrong.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 6 of 12
(3,285 Views)

Hi,

   I have attached a vi to this and i was using usb 6211 to acquire the voltage and daqmx clock vi has been put it in a continous mode and sampling rate set to 10 and the acquired data is saved in a spreadsheet file, and i run the program for 10 seconds and i stopped, it acquire the values and saved it in a file and when i analysed through the file it displays approximately 200 samples and i set the sampling rate to 10 as you said, am i missing any part here, do i need to add a timing function inside a while loop?.

Thanks in advance,

Regards,

Dinesh

0 Kudos
Message 7 of 12
(3,277 Views)

It works fine for me.  I edited your code to make the logging of the data more efficient (using the actual File IO functions and the Array To Spreadsheet String).


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 8 of 12
(3,274 Views)

Hi,

First of all sorry for asking the same question i didn't get enough idea in this because actually if i enter Sampling rat of 10 and i start the vi at 0th sec and stops at 10th sec and i saved the values in csv file when i go through the file it shows 200 samples per 10 sec, i don't understand this concept explain me clearly.

 

Thank you in advance,

Regards,

Dinesh

0 Kudos
Message 9 of 12
(3,247 Views)

I did not see that.  I ran for 10 seconds and got 100 samples per channel.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 10 of 12
(3,240 Views)