LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

error -200279 at DAQmx read

Hi i am fairly new to daq in labview,
 
i have code which accepts data from 2 devices a PCI 4351 connected to a TBX 68T and PC1 6111S card connected to a SCB68 block. i have uploaded the code.
 
when the code is running and then when i press the stop button on the front panel, i get an error of -200279 which is something to do with the daqmx read. I have looked into some other problems that some have faced on this error in this forum, and hence i have tried to increase the rate whilst keeping the number of samples the same but this has done nothing and the same error appears.
 
any suggestions will be greatful!
 
thanks
 
Notay
0 Kudos
Message 1 of 4
(2,832 Views)
Well the main problem is you have two different mechanisms to control the speed of your while-loop. First in the upper right hand side of the loop there's a wait until next (100) ms. The second timing method is the read 5 samples in a 1000 Hz stream, this only allows for 20 ms wait time.

AFter a while your buffer will be full (by the way you don't need to specify the number of samples per channel) and the AI read will generate an error.

Make sure you end the while loop as soon as the error is generated you don't check inside the while loop which is  a bad thing.

To avoid this you have to decide how to time your while loop.
I would set the number of channels to read to -1 (be aware you get 100 samples from the AI read)

Also replace the 'wait until next ms' with a 'wait ms'

And check for errors inside the whil e loop

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 2 of 4
(2,824 Views)

Thanks for all your help Ton, it worked.

however, the voltage inputs reads much faster than the counter and the temp inputs and takes in more samples per second, is there a way that i can increase the samples per second for the counter and the temperature to keep it in line with the voltage inputs?

at the moment the counter and temp inputs are only doing one sample per second, which is not enough for me to use.

Thanks!

Notay

0 Kudos
Message 3 of 4
(2,803 Views)
Hello Notay,
 
Please attach your revamped code so I can atake a look at it.
 
Cheers
 
Tom | NIUK
0 Kudos
Message 4 of 4
(2,760 Views)