Error of timing architecture producer/consumer


I use architecture of producer/consumer for the acquisition of measures of constraint by using several channels. Also, I am interested to write data all 1 minute given that the program should be run for a month. Currently, I get a 200279 error whenever I increase the time of 10 sec. To control the execution of the loop of producer, I use 'weight up to the next multiple ms' function. According to the error message, I tried to fix the samples to read without increasing the frequency of data acquisition, but I still get the same error.

Thank you


Your was not included, so we do not know what is happening there.

What is the rate of acquisition for your data acquisition task?  DAQ hardware do you use?

Have you tried to increase the size of the buffer?  There is a property node that can define it.

Tags: NI Software

Similar Questions

  • error 1 to queue in a producer/consumer architecture

    Hi all

    I use an architecture-based on producer/consumer queue, as shown in the screenshot below (which is a simplified diagram of what I want to do).

    As you can see:

    1 / in the producer of the loop, I read data from two LV2: map Wafer and HAD current

    2 / in the loop of producer, these LV2 are used as output of a sub - VI, called 'Wafer map change. The Subvi, allows the user to change the 'Wafer map' picture indicator located in the loop of consumption, by double clicking it.

    3 / when the Subvi has run, it displays the picture indicator updated (Wafer card) and the new 'Course DUT' coordinates.

    4 / the two variables are grouped and transformed into a Variant.

    5 / the variant is then enqueud in the queue of the 'hand '.

    6 / this variant is converted from inside the loop of consumption, and photo indicator is unbundled.

    7 / Finally, the map LV2 Wafer is written and the modified photo indicator.

    This type of data flow worked earlier, but now I am facing the following error (it's my french translation):

    Error 1 occurred: Add an element at the end of the queue in of automatic Test Bench

    Possible reasons:

    LabVIEW: An input parameter is not valid. For example, if an entry is a path, it may contain a character that is prohibited by the operating system, as? or @.

    NOR-488: The command requires a PDC GPIB controller.

    I have no idea how it appeared. But now I'm stuck, and I would be grateful if someone can help me with it.

    Thank you.

    Kind regards


    Your method to allow the judgment seems suspicious.  Say that there is an error in the loop of consumption.  This stops the loop of consumption and the stop button set to TRUE.  But the value of the stop button will not be read until the next iteration of the loop of producer.  So if you decide to hit the button on the Insert, the queue was already destroyed, then you will get your error.  And all these local variables just shouts "RACE CONDITION" for me.

    Get a mechanical action of the Stop button latch when out.  It is the default setting for a button.  Then place the terminal inside the event (which you already have).  A REAL outside this case, wire OR with wire error to stop the loop of the producer.

    You need to do is create a command to stop the loop of the consumer.  This order will be sent in the case of changing value of stop button.  You should probably send this command after the loop of producer, just in case where the loop of producer created an error.

    You can also use a node property of the button stop to set the Value property (signs).  This will cause the structure of the event to raise.  This will cause the producer loop stop if the consumer has an error.

  • First try the producer consumer Architecture: continuous play and dynamically update settings.


    I am currently working with two instruments; an Agilent E3646A and a NI 6212 BNC. My goal is to have the 6212 continuously take measures according to predefined parameters while the E3646A parameters can be continuously updated. This combination simple instrument aims to help me learn the manual architecture; continuous measurement, output dynamic controls and instruments more will be added in the future.

    I've already posted on a similar, but more complicated configuration ( and was advised to try the producer consumer Architecture.) I found the documentation on the website (,, searched the forums and built my own VI. While my first attempt at a producer consumer Architecture has solved some of the problems I had when I posted on the subject, however, new questions have been raised regarding the reading and adoption of the VI.

    I am currently able to run the VI and update the settings on the device. Previously, I'd get a freeze while the instrument has been updated and could not switch settings until it was done. This has been resolved, although that reading updates only when a parameter has been updated, although it is outside the structure of the event. In addition, the Stop button does not in any context. I also got occasional mistakes on the part of Deqeue, but the major part of the sentence is error-200279 'A tried to read samples that are no longer available' to DAQmx Read. I realize that there is a problem in my loop of producer but have not been able to find a way to solve it.

    This is my first attempt at a producer consumer Architecture and already I can see that it is a powerful tool. I read as much as I could and looked at examples, but should have some problems at the beginning. Would be very grateful of any advice so I can take full advantage of the architecture.

    Hope to hear from you,

    Yusif Nurizade

    You're going to overflow this buffer, unless the events are generated faster than "sample rate/number of samples.   Period.  Nothing could be simpler.

    You don't need a local to stop your curls.

    Try something like this attachment.  I simply moved the structure of the event in its own loop dedicated since it had nothing to do with acquiring data at all.

    Data acquisition loop stops very well when you destroy the task and destrying the stops of power queue (sending the default values of the queue for the power control) for EXAMPLE, to ADD a group of setting 'Safe shutdown' to a 'package' and it wire to the Center terminal (Prototype).

  • Architecture feature producer consumer

    I was wondering if the loop of consumer in a producer consumer architecture works only when the loop of producer send him something, or he still works, even if it receives nothing from the loop of the producer?

    It depends on how you put in place. If you do not have a timeout on the dequeue, he'll sleep until he gets a message. If you have a time-out, it will run if the value of timeout is reached.

  • IMAQ Vision: Is not an Image error when using producer/consumer

    Hi any person

    I used the Vision Express to solve the problem of Patern Machine.

    I want to put Assistant and Aquistion in 2 loop parallel. So I used the producer/consumer to transfer data

    After running VI, I pressed the Stop button and I encountered this error

    I think that getting the queue has a problem. I changed Image to Contant control and connect it to the data type of element. I think that this path is correct.

    So, in case of error, it addressed to Coppy IMAQ in Assistant. So I think that I used the Comunication of the queue is not correct.

    How can I solve this problem

    Thank you

    You can see more detail in the following video:

    Try this:

    You should put the image process in the loop of the consumer and release it properly.

  • Programmatically change the number of producers in an architecture of producer/consumer

    Hi all

    I've got 3 momo SoMat I am streaming of data to 10 Hz. I plan on 3 producer loops and loop a consumer to treat.

    I am pretty sure when I show my customer that they want to increase the number of devices. This scuppers then the producer/consumer model unless I change by programming the number of producers and the rest of the architecture associated.

    Is there a way to do this or a better architecture?


    As long as there is an ID any in your command of the queue, I do not see why your consumer cannot handle the producers as much as you need.  I would turn the producer code in a Subvi.  Make sure reentrant Subvi.  Then, you can call dynamically that VI as many times as you need, one for each instrument.

  • Trigger consumer in a producer consumer architecture

    I want to trigger the loop of consumer in a producer consumer architecture, so that it can do what it should do, until he receives something new producer loop.

    Can someone tell me please how to do this?

    Thanks in advance!

    If the Dequeue-1 item timeout entry turns off the timeout.  That means he'll stay there forever until the data is available in the queue.

  • Is the reference of the register of necessary shift in architecture of producer/consumer?

    Hi guys,.

    I was just wondering if the producer/consumer architecture is necessary register wired shift to the reference of the queue or the notifier. Is this necessary?

    I think that it isn't, because it's quite a tunnel but could anyone who thinks that the shift register is necessary, explain to me why it is necessary?

    In each of the samples I found the reference to the queue or the Notifier is connected to a shift register, I tried to wire it to a tunnel and it works well, then, what is the best implementation?

    Thank you in advance.

    Thank you guys for your quick responses...

  • Timed loop in loop of producer/consumer


    I have a loop of producer/consumer LabVIEW program configuration to allow me to properly capture the images that are large enough (8MP) at about 14 frames per second (FPS). The program works very well when the consumer loop is a while 'loop' (recorded at 14fps without problem), but I wanted to do a loop timed, so that I can vary the FPS as requires it. A curiosity arises when I do that. Anywhere under 12 fps, the loop works very well and the data is saved correctly. However, when I bump it up to 13fps, the calculated consumer FPS goes haywire and starts to jump between 9 ~ and ~ 13fps (processing of data gets bogged down?). When I set the FPS at 14, the loop runs at a constant maximum 7 fps. Is there something I can do to remedy this situation?

    I have attached my .VI

    Thanks in advance!


    Are you using LabVIEW Real-time? Loops clocked to a windows OS do really increase determinism more than a while loop with a wait until the next timer multiple. Before you change the loop of producer-consumer in order to include a while loop was programming works correctly? You can also vUtiliser the VI analyizer to see how long things take to run. I let the loop of consumer to the producer in the traditional game upward and change the FPS by controlling the timer to wait, after benchmarking your code, it should be done in the same way as you did for the timed loop

  • trigger several events to user in an architecture of producer/consumer

    Hi all

    I use a producer/consumer architecture, where the case within the property are selected with enums sent via a queue.

    Enums are queued in the producer, which is a Structure of the event inside a While loop. Then each of the events in the producer is associated with a case in the well (to make it easier).

    Now I would like to run several events in the producer, programmatically in a given sequence. The events involved in the sequence are basically all triggered by changing the value of a Boolean value (button).

    Please find attached a schematic representation of the sequence, I would like to implement.

    I heard of 2 solutions:

    -"Writing to the node (Sgnl) Value property of the variable [I] want change."

    -Dynamic user events

    In any case, I don't know how to make sure this is done for several events in a specific sequence?

    Thank you.


  • Convert single while loop with variable Timing literal to the producer consumer

    I have a controller for a biological system that updates every n minutes or every minute 2n, under certain conditions. My app has a synchronization controller calculates if the current iteration is n or 2n and feeds the output of this calculation in a loop of "Timing" VI in my all. If I understand correctly, this is similar to the issuance of an order of sleep() in a language similar to C and should be avoided. I'm refactoring my code and I heard that they are well suited for this kind of things. Here's how it should work:

    1. Loop begins at the time T, T is saved.
    2. Schedule controller runs and calculates if loop will get minutes 2n or n minutes. This controller will take a number of milliseconds to complete, so we are is more to time T.
    3. Now that the update interval (n or 2n, let's call it u) is known, the loop must until T +u fill.
    4. The PDC is executed, but a number of milliseconds to execute.
    5. The rest of the time until the next iteration of loop should produce the CPU for other processes.

    It sounds to me like it's the kind of a real-time system, although as long as we are in the minute of the original deadline, there will be nothing wrong.

    What the producer-consumer loop would look like? Assumed that the synchronization and the main order controller are separate from the VI.

  • overflow memory for the producer consumer

    I'm trying to save data from 4 ports to 40.96 Mhz. using a producer consumer architecture and a PCIe NI 6527 B using an external clock.

    I inherited code which works for 2 ports.  I tried to add additional ports and changed the size of the data to the queue and data.  Launch the program several times, reach conflicting error messages after less than 2 seconds from the beginning:

    Error 200284: Some or all of the requested samples are not yet acquired.  [...] To make available samples more quickly, increase your sampling rate

    200361 error: Overflow memory device on board.  Due to the limitations of system and/or the bandwidth of the bus, the driver could not read the device fast enough to follow the flow of the unit.  Reduce your sampling rate.

    What is a race condition between the error messages, a problem of timing of start or something else?

    I approach, how to debug these types of problems?  How can I determine what is causing the error?  I can't single step through because I'm at the wheel of sampling with an external clock.

    Running on labview 2012 Windows XP on the machine who's 3.17 GB of ram.

    Try to reduce the size of your buffer.  In fact, simply leave the calendar DAQmx unwired.  The size of the buffer must be large enough by default.  And then also try to read less data at a time, as data instead of data 500ms 10ms.  What I suspect here, it's that the DAQmx buffer is too large and therefore must use the hard drive for part of the buffer, to slow things down a lot.

    Other notes here:

    1. do not use the time-out to stop your loop of consumer.  Your producer should send an order of a certain type to your consumption by telling it to stop.  In this case, I would use an empty array.  And then, you must release the queue after the loop of the consumer.

    2. you want a constant FALSE to Append Array/String input size of the binary file write.  This will remove the 2 I32s at the beginning of each table that you write.  Eelle are here to tell the size of the table being written.  But since you are just data flow, I doubt that you care about those.

    3. instead of the entire setup of producer/consumer, have you considered using just the DAQmx Configure Logging VI do DAQmx stream directly to a TDMS file for you?  Makes things much faster and much easier on you.

  • What is the fastest method producer consumer. Queue, RT-FIFO, event

    Hi all

    Another question completed for the pro:

    I recently inherited the labview code that uses RT-FIFO for the transfer mechanism in the architecture of the producer consumer.

    The code was first written in 3-4 years and is currently in LV8.6. It is possible that the reasons for the architectural decision no longer exists.

    I am qualified using a producer consumer queued architecture,

    I understand the RT-FIFO Architecture.

    I started using an architecture based on events from the user.

    (I have attached samples of each)

    I also see the existence of a priority queue

    Each method has its own capabilities and gaps, that hand, nobody knows the relative performance of each method.

    (Assuming that the only process)

    I would expect RT-FIFO to be faster, there seems to be a version of low characteristic of a standard queue.

    What is the perfornace hit to use a coding user-friendly queue more

    RT-FIFO description talks about commications between the time-critical and lower priority threads.

    Until today, I thought that the queues had the same capacity.

    I've included an event method that I commonly use for review by peers and help from other users...

    It allows to:

    1. several producers with different types of data

    2. process 37 production order.

    3 allows asynchronous verification of functional notifiers such as stop, start and abort.

    4. in a system not real-time, it can include interactions of façade.

    What I do not understand on this subject, that's what are overhead or thread priority changes that may occur using this architecture (it solves a lot of problems for me).

    Thanks in advance,

    Hi Timmar,

    Here's a KB article on some frequently asked questions about the RT FIFO:

    The more relevant question is #4, I posted below.

    What is the difference between RT FIFO and queues? 
    Functionally, RT FIFO and LabVIEW queues are two pads of first in, first out. However, here are the main differences between them:

    • RT FIFOs run deterministically in LabVIEW and evanescent code queues are not. This comes from the fact that queues use block calls during read/write to the resource shared, while RT FIFOs use non-blocking calls.
    • RT FIFO are fixed size while queues develop when items are added to them.
    • RT FIFOs will execute the code, even if there are input errors. They can (and will) produce new errors and spread the existing errors.
    • Queues work with any type of data, while the data types that can be used with RT FIFOs are limited. Generally any type of data involving allocations of extra memory can be used with RT FIFOs to preserve determinism.

    Let us know if you have persistent questions!


  • events producer consumer with notifiers

    Dear users of LabView,

    I would like to ask your advice on my project (see the attachment of files). For the beginning, I did only the "backbone" of my project, that's what you can see in my VI. My project will have the following features:

    -Start and stop action possibly (and also plot data to the chart and saving the data to the file)--> here is some time a loop to record data ranging from DAQmx (USB6009) and another while loop with rates of different loop to rise in voltage output amplifier of the magnet.

    -During the measurement, or if the system is idle, the user is able to read files of measured data and evaluate the measured data, etc... (so there will be more features...)

    I decided to use producer consumer structure with events and the authors of notifications, and I also use the dynamic user event to be able to communicate to the consumer with the producer (where I have my machine of the State as in a shift register).

    Please comment on my VI, what do you think? Maybe I should use the state machine (the shift with the pole of the State Register) in the lower loop? I could also use up queues of the notifier, but since I send only orders and the values of the parameters (not streaming broadband data) I guess that the declarant is fine?

    Thanks for the tips!

    The code you posted looks like a good start.  The architecture is very similar to the measurement sample continuous project comes with LabVIEW 2012.

    A few things I noticed:

    1. I would usually use queues instead of filers (unless you want to manage only the last command and not all orders in the order they are received).
    2. You don't need the registry change in the top loop (structure of the event).  You inadvertently send a length of measure and other commands parameter since you replace only the command.  Probably, this is no problem for now but could be a problem later.
    3. I think the user events are a great way to manage cases of judgment where the consumer is able to report to the producer that the application must exit loop (this is how we do in the sample project).
    4. Your case 'Init' confuses me a little.  It is read length control measure and send a user event in the event that, in the structure turn immediately place a measure command. Once I see a control in a loop of consumer as it hurts a bit uncomfortable. Why not have the value "start_measurement" to change event read the length of measure command and send it as part of his message to the consumption loop. Then the loop of the consumer can Init and self talk to start the measurement.
    5. You may need to rethink your strategy mistake in the case of the measure. Currently you do not stop a loop if an error occurs, and allows you to keep the error between iterations of the loop information shift registers.  Therefore, if an error occurs in one of these loops you can never hear about it.
    6. In general, using the error state as the main way to stop a loop from consumers is a bad practice. I'd rather see a "Shutdown" command which causes the consumer to stop loop. It is more scalable and less likely to be triggered by the accident.

    Good luck with the rest of your application.

    ~ Simon

  • Producer/consumer problem: several loops/queues


    Please refer to my previous post ... > for more on the subject. I was told to try a producer/consumer architecture, so I decided to go and do it.

    After doing much research, I come back to ask for help.  I decided to try to implement three loops. The reason for this is because I thought that the length of each loop synchronization can be controlled independently as it should. A single loop treats all user interactions.  A single loop treats data acquisition.  A single loop about the transformation.  I hope that this would help, but obviously made things much more complex.  I created a queue for each loop.  I didn't get the full project, but it seems that everything has run very well where I stopped.  However, one of my States I did not queue receive queue and I have no idea why or where coming.  There is an error in the variant data that says

    'status'-> TRUE
    'source'-> ' error: Invalid Args.

    However there is no error in wiring.  Also when this error is displayed, the random State fell through.

    The other weird thing is the number of items in the queue jumps very quickly when I do almost anything.  I don't know if it's common.

    Before I post pictures or whatever it is, I would have an idea about this error.

    Also, I think I saw this in a previous post about the BAU, but I would like to ask a question.  Attached are two photos.  Queue 1 is the way I put things in place.  Queue 2 is the way I saw things in place.  Can someone tell me if the queue 1 is the wrong approach and why?

    I realized what happened.  The other loop was not handled properly and sent the random State of the main loop.

Maybe you are looking for