Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Error message 200288

Hello,

 

I have been working on this code for a little while now, and seem to be running into error message 200288. I've been checking online how to fix the problem, and don't seem to be able to get anything to work.

 

I want to be able to output a voltage every time the user clicks the button. I have it so that the voltage can be output twice before the error pops up. If the user clicks the button labeled "Push When Done With Current Scan " after the first scan, the error message never occurs. Even if they don't change any of the original values. Also, if the user clicks "Continue" on the error message, they are able to scan the voltage two more times without the error popping up. Ideally, the user would be able to scan the voltage as many times as they please before having to click "Push When Done With Curretn Scan". If it helps, I am using USB 6221 M-Series to scan the voltage range.

 

I've been over several of the posts on here, and can't seem to come up with an adequate solution. Any help on how to handle the error would be greatly appreciated. Thank you. 

0 Kudos
Message 1 of 2
(2,725 Views)

Hi, NETLab486.

 

I took a look through your code, and I noticed that you are defining the buffer size to be the same size of the array of data points and writing to the buffer with the array of data points twice.  Basically, you're filling the buffer completely with the first DAQmx write VI, then you're trying to overwrite the buffer with the second DAQmx write VI.  The buffer can only be overwritten when there is space in the buffer.  When you call the DAQmx write VI again after you have started generating, generation will wait until there is space in the buffer before it starts to overwrite the buffer.  Since you have configured for finite generation, your VI will only generate N samples, regardless of how many times you call the DAQmx write VI.  

 

 

Also, in your code, I noticed you are using the DAQmx Start Task.vi and DAQmx Stop Task.vi inside of a while loop.  It is good programming practice to call the DAQmx Start Task.vi before the while loop and the DAQmx Stop Task.vi after the while loop to reduce driver overhead. 

 

Check out the Gen Mult Volt Updates-Int Clk Example program in LabVIEW for a model to set up a finite generation.

Regards,

Sara Lewandroski
Applications Engineer | National Instruments
0 Kudos
Message 2 of 2
(2,692 Views)