LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I am not sure I am understanding the concept of "number of sampling"

Solved!
Go to solution

As I understand, if I set the Sample mode as Continuous, Sample Rate as 100kHz, and Number of Samples as 100k, 

1. While loop will act when time spend 1second. (to wait for refresh)

2. The output array data of 'DaQmx Read.vi function' which is in the while loop would contain 100k samples. 

3. If new loop start, the past output array data does not store in any buffer. It is completely deleted.

4. But if WaveformChart is in the while loop, and connects to the output array data, then the buffer of WaveformChart saves that data (depends on a x scale of the chart.) 

 

Is this concept right?

0 Kudos
Message 1 of 3
(259 Views)
Solution
Accepted by GINNYV

Hi ginnyv,

 


@GINNYV wrote:

As I understand, if I set the Sample mode as Continuous, Sample Rate as 100kHz, and Number of Samples as 100k, 

1. While loop will act when time spend 1second. (to wait for refresh)

2. The output array data of 'DaQmx Read.vi function' which is in the while loop would contain 100k samples. 

3. If new loop start, the past output array data does not store in any buffer. It is completely deleted.

4. But if WaveformChart is in the while loop, and connects to the output array data, then the buffer of WaveformChart saves that data (depends on a x scale of the chart.) 

 

Is this concept right?


Not all items are right…

 

  1. The loop will iterate in intervals of 1s, as DAQmx needs 1s to read 100k samples at 100kS/s sample rate.
  2. When you request 100k samples then DAQmxRead will deliver them (unless an error occured)…
  3. Your "array" probably is just an indicator. Indicators only display the data that you provide by the wire…
    (You could use a shift register to create your own buffer.)
  4. Charts have their own history buffer and you can define the size of this buffer. The buffer does NOT depend on the x axis of the chart…
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 3
(249 Views)

A subtle point is the DAQmx Read function has an (optional) input for # Samples to read.  It is not always present (depends on the polymorphic version of the DAQmx Read function), but if present, it should be wired, often with the # Samples specified in the preceding DAQmx Timing function.

 

Bob Schor

0 Kudos
Message 3 of 3
(206 Views)