02-21-2013 08:35 AM
I want to stop DAQ assistant automatically after a period of time, so I created this VI.
When I start the program, it run and after reaching the specific time value 50, the graph indicator 'looks'' stop, but after wait for 9999 second, the graph indicator suddenly show lots of data which seems to be taken during the 9999 secs, What happen? after that, it gives error, saying
Possible reason(s):
Attempted to read samples that are no longer available. The requested sample was previously available, but has since been overwritten.
Increasing the buffer size, reading the data more frequently, or specifying a fixed number of samples to read instead of reading all available samples might correct the problem.
Property: RelativeTo
Corresponding Value: Current Read Position
Property: Offset
Corresponding Value: 0
Task Name: _unnamedTask<100>
The DAQ cannot be stopped that way? 😞
thanks
Solved! Go to Solution.
02-21-2013 08:46 AM
You need to stop the task after reading it 50 times. Also, some advice, you can just use a for loop instead of of using a while loop and checking the iteration. It is alot of un-neccessary code.
02-21-2013 10:31 AM - edited 02-21-2013 10:33 AM
Change the Acquisition Mode to "N Samples". Set N to however many total samples you want. Remove the FOR loop.
EDIT: Sorry, your original code has a WHILE loop. That isn't needed when you set the acquisition mode to N Samples.
02-21-2013 10:51 AM
thanks, I removed the for loop, and now there is another error. it says:
Possible reason(s):
LabVIEW: End of file encountered.
=========================
NI-488: Invalid argument or arguments to function call.
I step in one by one to see what happen, but cannot find it 😞
02-21-2013 11:11 AM
That is most likely from the Read Measurement File. But I don't see a need for that node since you already have the full data when you write. And what is the point of the scaler indicator? It will only show the first data point. Remove the read and the scaler indicator. They are just making your life more difficult.
02-21-2013 11:15 AM - edited 02-21-2013 11:16 AM
ok, let me try
02-21-2013 11:25 AM
I am sorry, I forgot to put a data analyzer between the scalar indicator and the read from measurement file.... I just want to take some measurement and do statistic analysis such as mean, mode, stdev etc.
Is my way correct? I still got the same error
In the picture, what's the difference between choosing/not choosing that box? How does the statistic analyzer calculate mean if I dont check that box?
02-21-2013 11:30 AM - edited 02-21-2013 11:30 AM
Not quite. Like this.
02-21-2013 11:51 AM - edited 02-21-2013 11:53 AM
you are so great, problem solved actually 🙂 finally...
and since i connect to my daq device which is 6009, the graph indicator only shows one 'dot' no matter how many daq and wait case has been done, it just stay there. Can I ask the graph indicator to move along. thanks
02-21-2013 12:00 PM
I think I know to do, just change the waveform chart to waveform graph is it right ?