03-28-2011 09:03 AM
I think this is a relatively simple question but it keeps throwing me the Error -200278, where it tries to sample a point that is not acquired. The solution says that I should be using continious acquistions but I only want to sample for a specific time. I am using a CompactDaq with 9234. However I want to have a real time chart, which is why I am using the while loop. Does anyone have a suggestions? Have attached vi
Solved! Go to Solution.
03-28-2011 05:53 PM
I think you need to set a stop condition on your while loop. After you get your last sample, you will call DAQmx Read again and you should get error -200278. That actually makes sense. You could index into your waveform and use "Get Waveform Components" to get the Y array, then use an Array Size VI to keep a running count of the # samples you have acquired (see picture). When you reach the number you expect, stop your while loop. You could also solve this by reading 10 instead of -1 and count (i+1)*10 = samples acquired.
Either way.
Let me know what you find.
-gaving
03-29-2011 04:01 AM
Method 1 as shown in the Vi is successful. Have not tried "10 instead of -1 and count (i+1)*10 = samples acquired."
Thanks for the help!