04-20-2015 04:19 AM
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.
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
04-20-2015 04:31 AM
04-20-2015 06:51 AM
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.