LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmx sample limit; is it related to buffer?

Hi everybody,

I built a datalogging system using DAQmx functions whose task is created and started before a loop (see Fig. 1). As can be seen I set the sample rate of the DAQmx Timing block to be 1. 

 

Then, I take the readings using DAQmx Read block inside a Control and Simulation Loop (because I'm using some blocks from the Control module) which is executed every 1 sec (Fig. 2). The system is meant to run all the time. For this case I set the Simulation Loop Final Time as "Inf" and put a halt button to stop the loop.

 

excerpt.jpg

 

However after 1000 samples it seems that there are no more data being read (indicator shows "0" for all channels). 

I browsed in forums and NI websites and want to confirm my understanding:

 

1. Is this issue related to DAQmx buffer?

2. Aside from "task in", "task out", and sample rate, I left other terminals in DAQmx Timing block open. Should I set the "sample mode" into continuous? What is the default setting if it's left unconnected?

3. What setting / blocks would be needed to read (and later record) more than 1000 samples?

 

Looking forward to hearing any feedback and comments. In the figures I cut the original VI in purpose as it has many channels and signals.

Thanks and advance!

 

Tian

0 Kudos
Message 1 of 3
(2,636 Views)

Hi s3s3,

 

using error cluster wires you could easily check for errors in execution of your VI.

But as long as you don't use them you will (maybe) never even recognize errors…

 

 

Best regards,
GerdW


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

Hi GerdW,

Yes you're right I did create error indicator for the loop but not for the DAQmx blocks. Checking the errors from the DAQmx blocks I found an error from DAQmx read block inside the loop which shows after the 1000th sample which is error -200278. So I set the "sample mode" into continuous and the VI keeps running 'normally' so far after > 1000th sample.

Thanks.

 

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