Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Finite acquisition and Real time charting

Solved!
Go to solution

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

0 Kudos
Message 1 of 3
(2,659 Views)
Solution
Accepted by topic author Ech101

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

 

totalsampleadder.jpg

Message 2 of 3
(2,647 Views)

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! Smiley Very Happy

 

 

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