08-15-2011 11:32 AM
The program is thus: initialize and communicate with a stepper motor attached to a mounted interferometer. However, I cannot seem to get the sampling rate any higher than 1k at 1k samples.
Error:
"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<2>"
Any help would be great!
08-16-2011 10:45 AM
Hello PandaPhysics,
Thanks for posting. I took a look at the VI you attached and my initial thought as to why you could be seeing that error from your program may be caused by the additional code that you have in your read loop. The issue would be that the extra code is causing you to not execute your DAQmx Read.vi often enough to pull samples out of the buffer. Try removing the extra processing code from your loop (or create a simple example using just the DAQmx functions) to see if your hardware will read correctly.
If you do not see the error when you remove the extra functions from your read loop, I would recommend using a producer-consumer type architecture for your program. Pass the data you read from your hardware to another loop that will process the data. Let me know if this helps!
Regards,
Joe S.