LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Producer/consumer architecture timing error

Solved!
Go to solution

Hi,

       I am using Producer/Consumer architecture for acquiring strain measurements using multiple channels. Also, I am interested in writing data every 1 minute since the program has to be run for a month. Currently, I am getting an error 200279 whenever I increase the timing from 10 sec. To control the execution of producer loop, I am using  "weight until next ms multiple" function. According to error message, I tried to fix the samples to be read without increasing the frequency of data acquisition, but I am still getting the same error.

 

Thanks

 

Piyush 

0 Kudos
Message 1 of 7
(3,017 Views)

It doesn't sound like the problem is due to your producer/consumer architecture, but to your DAQmx functions.

 

10 seconds is a long time between DAQmx reads.  You'd probably be getting a timeout error unless you happened to increase the timeout function.  Your DAQ task creates a finite size buffer that probably isn't long enough to acquire more than 10 seconds worth of data.

 

You need to either increase the size of your buffer, or set your acquisition to occur more frequently.  If you are using a Wait until Next ms Multiple inside of a loop, a 10 second wait in there is a rather long time.  It would probably cause your program to feel unresponsive if you hit the stop button.

0 Kudos
Message 2 of 7
(3,005 Views)

Of course posting your code would help so we do not have to guess.

Tim
GHSP
0 Kudos
Message 3 of 7
(2,997 Views)

Here is the code.

 

Thanks

 

Piyush

0 Kudos
Message 4 of 7
(2,993 Views)

There are missing a sub vi from your code.

 

The code don't show how you configure the DAQ. That is an importen point.

 

Othervise, be carefull with overlapping elements like wires and functions. You have a lot of those.

And why are you using the Lossy Enqueue Element for putting an element in the queue? 

You have a unlimited size queue, no need for lossy enqueue.

0 Kudos
Message 5 of 7
(2,986 Views)
Solution
Accepted by topic author PChauns

Your test3.vi wasn't included so we don't know what is going on in there.

 

What is the acquisition rate for your DAQ task?  What DAQ device are you using?

 

Have you tried increasing the size of the buffer?  There is a property node that can set that.

 

Message 6 of 7
(2,985 Views)

Thanks for your help. The issue is resolved now by increasing the buffer size.

 

Piyush

0 Kudos
Message 7 of 7
(2,970 Views)