LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error 200284 keep showing up with DAQmx/USB6259

Hi Ton,

 

Thank you for testing on the code, but I dont have access to my updated SampleVI right now, I only added a function generating vi to the previous posted sampleVI.  After a few more test today, there are two suspects: 

 

1) is the timing source setup which resulted in an out of sync between my input and output after a certain time. and

 

2) the speed of the loop in which DAQmx Read was situated was changing quite a lot (or the rate of data being put onto the DAQ board was changing) as I saw the "AvailaleSampPerChanel" was increasing first to a few thousands and then drop down quickly to zero, that is when the code stops and the error 200284 showed up.  If I slowed down the loop significantly, I will see error 200279, a buffer overflow error.  This could mean that the rate of my data reading loop is out of sync with the rate of data being acquired by the DAQ board.  I have tried Timed Loop and carefully adjusting the period of loop, but didnt get much improvement.

 

Please let me know if you have any suggestions or comments on my observations, or any other thoughts. 

 

Thanks again,

 

Bryan

0 Kudos
Message 11 of 16
(1,198 Views)

BryanL wrote:

2) the speed of the loop in which DAQmx Read was situated was changing quite a lot (or the rate of data being put onto the DAQ board was changing) as I saw the "AvailaleSampPerChanel" was increasing first to a few thousands and then drop down quickly to zero, that is when the code stops and the error 200284 showed up.  If I slowed down the loop significantly, I will see error 200279, a buffer overflow error.  This could mean that the rate of my data reading loop is out of sync with the rate of data being acquired by the DAQ board.  I have tried Timed Loop and carefully adjusting the period of loop, but didnt get much improvement.

 


Bryan


No that is not what it means.

Is there a reason to read 1 sample?

Your while loop is too slow to keep up with the sample clock. Just make sure you read more or all (-1) samples in  a NSamples NChannels read routine.

 

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 12 of 16
(1,193 Views)

TonP wrote:

BryanL wrote:

2) the speed of the loop in which DAQmx Read was situated was changing quite a lot (or the rate of data being put onto the DAQ board was changing) as I saw the "AvailaleSampPerChanel" was increasing first to a few thousands and then drop down quickly to zero, that is when the code stops and the error 200284 showed up.  If I slowed down the loop significantly, I will see error 200279, a buffer overflow error.  This could mean that the rate of my data reading loop is out of sync with the rate of data being acquired by the DAQ board.  I have tried Timed Loop and carefully adjusting the period of loop, but didnt get much improvement.

 


Bryan


No that is not what it means.

Is there a reason to read 1 sample?

Your while loop is too slow to keep up with the sample clock. Just make sure you read more or all (-1) samples in  a NSamples NChannels read routine.

 

Ton


Ton, thank you so much for the suggetion...so I went to add a NSampleNChannel Read function after my NChannel1Sample Read in the loop to make sure all buffer samples are read, that turned out not helping, still have 200284 coming up, also show up a little earlier.

 

I also played with the following approach:   I added a wait function before my NChannel1Sample Read and based this wait function on the input of NumbSamplesAvailabe, when the availabe samples are less than 50 then I used 1ms wait, otherwise my wait function=1/NumbSamplesAvailable.  This will maintain the number of samples at ~50, didnt going up too much and also not going down.  This was maintained for 1-2 minutes, still the application will halt with Number of Smaples dropping to 0.   This let me to suspect the DAQ board stopped acquiring data after 1-2 min of running the application. Wonder what is the cause for this? IS it because my application having a too high demand on the DAQmx function or hardware so that it is hard to keep up. Thanks to anyone with a suggestion.

 

Bryan 

 

0 Kudos
Message 13 of 16
(1,173 Views)

Is there a specific reason to use the 'Read 1 sample' function?

Replace it with the 'Get all samples' function.

 

I think that the DAQ output is done sampling data this will stop your input clock  (If I remember your code correctly, please attach) so you have nothing available.

 

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 14 of 16
(1,151 Views)

Hi Ton,

 

Thank you for your reply, I tried before with NChannelNsample and that was not work out. I dont quite understand why you say the output is done sampling data, I assumed it keep output contineously at the scan rate I specify (1kHz) in this case. I should be able to contineously acquire data without needing to restart the AO and AI tasks, i must have missed something here.  I loaded some revised sampleVI.

 

Regards,

Bryan 

Download All
0 Kudos
Message 15 of 16
(1,130 Views)

Bryan,

 

I don't have time to check the code right now, what you could easily do is in the the while loop look up the DAQmx write property 'Total number of Samples generated'.

If this is limited to the size of your array you should set a property 'Regenerate samples' (I am not sure where that one is located).

 

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 16 of 16
(1,118 Views)