LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQ assistant and 200279 error

Hello,

 

I am using DAQ assistant to read 56 channels at 1kHz. (Number of samples = 100) At the test mode of DAQ assistant everything is fine. However when I run it sometimes I get 200279 error, especially writing to a file. I know that I need to synchronize DAQ assistant and writing module.

 

Is there any way to get rid of this error without using DAQmx code?

Also I am a new LabView programmer, is this code need to be optimized?

P.S. the code is attached.

 

Best regards,

Erden

 
0 Kudos
Message 1 of 5
(3,138 Views)
The problem is that you are trying to write to the file in the same loop as you are acquiring data.  100 samples at 1kHz rate means the loop needs to run every 0.1 seconds.  The problem with the write to measurement file Express VI is that every time it runs, it needs to reopen the file, write to it, then close it.  That takes time.
 
Try using basic file I/O functions that open the file before the loop, write to the file in the loop, and close the file after the loop.  Better yet is to do that, but use a producer/consumer architecture that passes the data from the DAQ loop to a logging loop by way of a queue.
Message 2 of 5
(3,124 Views)
Thanks a lot, it seems like the best solution. Eventually I will use it. But I am just a beginner and it is easy to deal with Express VIs for now.
I am wondering that if there is another way with write file express VI? Like using just different loops or producer/consumer architecture or pausing the acquisition when necessary?

Regards,
Erden
0 Kudos
Message 3 of 5
(3,106 Views)
Yes.  You can still do a producer/consumer setup.  Move the Express VI to the consumer loop and pass it the data in the blue wire by queue.
0 Kudos
Message 4 of 5
(3,100 Views)
Thanks a lot. I used producer/consumer setup with express VIs and it works great.
0 Kudos
Message 5 of 5
(3,098 Views)