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 GUI.vi 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

Florian

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.

Tags: NI Software

Similar Questions

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

    Hello

    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 (http://forums.ni.com/t5/Instrument-Control-GPIB-Serial/Split-second-lag-when-controlling-two-instrum... and was advised to try the producer consumer Architecture.) I found the documentation on the website (http://www.ni.com/white-paper/3023/en/, https://decibel.ni.com/content/docs/DOC-2431), 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).

  • 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.

  • State machine in queue with the producer consumer

    Hello

    I am trying to build a VI where the user allows some Boolean controls on the front panel.
    VI uses a producer consumer in which based on Boolean values clicked architecture.
    some States are queued one recorded in a table.
    After the user is done by selecting, Boolean values should get disabled and the table of States
    should be indexed one after the other.
    It is an attempt to solve the review model car wash.
    However, the VI does not generate the required results.
    Can someone help me please understand what is the correct way to this implementation.

    Thank you

    Its because you have wired the consumer while loop the first stop. Remove and in your loop of consumer, make a comparison of the States that you receive and if it is equal to stop, stop the loop of the consumer.

  • Producer/consumer problem: several loops/queues

    Hello

    Please refer to my previous post ... http://forums.ni.com/t5/LabVIEW/What-is-the-best-way-to-switch-between-multiple-image-buffers/td-p/1 > 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
    'code'->-6
    '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.

  • Learn how to use queues producer consumer event

    Hi all

    I'm trying to understand the good programming techniques for the use of the elements of the queue in a producer / consumer event-driven program. I am looking for some demonstration programs have an idea of the functioning of these looops-based. Currently, I'm not sure on how to deal with errors that occur before an event from the queue (see screen capture below).

    If a queue receives an error, it seems that the queue item is never received. I have an OR statement to stop the producer loop when it receives an error message. However, because the question has never been in queue, dequeue in the consumer just loop element crashes then the consumer don't never closed loop the while loop.

    What are some good techniques to handle errors that are placed in a queue? I could probably cable a timeout on the dequeue, but I prefer not to use this approach if possible.

    Thank you


  • Buffer could replace the queue in the design of producer/consumer model

    Hello

    I have a question to which the task of buffer to store the data and the queue is also of the same thing so we could use the inplace queue buffer in a design of producer/consumer model.

    No, these examples of buffer not almost equal to a queue, and never "replaces" queue at the producer/consumer.

    The advantage the most important of the queues for the producers/consumers (which none of the other mechanics buffer sharing), it is that it works activities to warn the reader that the data is available. So if you would simply replace the queue by mechanics of tampon too developed that you have attached to your last post, you will lose a large part of the object using producer/consumer.

    Thus, to compare the two mechanics:

    -Tail works activities, while the example of the buffer is not.

    -Tail must allocate memory during execution if several items are written in that corresponding queue. This also applies to the buffer (must be resized).

    -Given that the buffer is actually simply a table with overhead, memory management becomes slow and messy with the increase in fragmentation of memory. Queues to play much better here (but have their limitations, there also).

    -Overload of the buffer (the table manipulation) must be implemented manually. The queue functions encapsulate all the necessary features that you will need. So the queues have a simple API, while the buffer is not.

    -Given that the buffer is simply a table, you will have a hard time sharing the content in two parallel running loops. You will need to implement an additional charge using data value references to manage the buffer or lose a lot of memory using mechanics as variables. Lose the memory, you will probably encounter racing conditions so don't think not even on this subject.

    This led to four '+' for the queue and only a single point where 'buffer' is equal to the queue.

    Hopefully, this clears things up a bit.

    Norbert

  • 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 DAQ.mx 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.

  • 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...

  • 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.

    Florian


  • Producer consumer Start Trigger

    Short explanation: I use a party apparatus 3rd signal a TTL to use as my trigger early in my VI. My cDAQ and modules seem to have the ability to send a trigger start regardless, but I could not track down the how to do this in a system of producer/consumer.  I have an idea at the bottom of the long explanation.

    Long explanation:

    I am running a test system that monitors the pressure wave by an inflammation of the hydrogen/oxygen. The components are a cDAQ-9188 with modules 9222 (x 3 HAVE broadband), 9481 (x 2 relays), 9402 (x 1 i/o Module), 9221 ('Low' speed HERE).

    Based on the recommendations contained in this forum, I placed my DAQ in a producer/consumer architecture.

    At this point the system works for the most part, I still have some more things to add for all the information I want to collect. However, it records at high speed and the 9221 and the 9222 modules are synchronized. He collected reliable data to date successfully.

    When the system boots it will follow, but not save. I need to fill the structure tested with gas at a specific concentration before I switch on/registration. When I press the record button I have a TTL of the 9402 signal to my high-speed camera and I close a relay on a 9481 who engages in an ignition system. Ignition system takes a variable amount of time to load and shoot so I have a timer that leaves the TTL and the active relay for half a second.

    My problem and it is a small, comes up with the system monitoring and synchronization. In order to get the system to synchronize properly, I had to generate an external impulse in PFI0 to use as a trigger. I tried to assign the different clocks available as a trigger of the beginning, but I found myself with unsynchronized data.

    Is there a way to generate a pulse on my 9402 to use as a trigger? It feels stupid for me to use an external device, when I have something that can generate the signal that I need.

    Thinking about this post, I have solved my problem, at least in my head. I think I can move the output TTL VI (that I'll eventually change to DAQmx) in the loop of producer and move my statements true or false for the consumer in the form of a 1 d array loop in my queue to start recording. Probably more than that, but I can only learn by experimentation on the right?

    Thoughts? Recommendations?

    VI attached.

    You cannot generate a pulse with the 9402 himself. The pulse would be actually generated by the 9188. You must create a task of meter output to generate a pulse train. Try the attached example as a starting point to experiment with the meter.

    This Vi is for LabVIEW 2013, if you have an older version let me know and I'll try to convert.

  • Master/slave producer/consumer Feeback?

    We know that in the models of master/slave and producer/consumer can send information of the master loop or a producer to the loop of the slave or the consumer.  But what to get information of the loop of the slave/consumer back to the master/producer loop?  I think it may return some sort of output or a message saying something like "I finished my work successfully.  This can be done with local variables, but is it really a good idea?  Is there another better way?   In addition, in this case can I just use a sub - vi?    I don't know that I always get the PARALLEL treatment offerred by master/slave and producer/consumer with a sub - vi.

    You can use a notifier to send a return message.  You can use a local variable, but unless you know what you are doing, you might encounter problems with race conditions.

    Sub - VI have nothing to do with producer/consumer architectures.  You can do a p/c with or without sub - VI.  Sub - VI is a way to break the code in significant functional blocks.

  • 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.

  • best way to handle this situation of producer-consumer

    It is, I know a common thing, however, I never really thought about before. I can't post my VI so a description will have to do. It goes without saying, but again, it's producer-consumer architecture. Let's say you have a generator of signals and all the controls that are in a cluster. A value is changed, an event in the loop producer and you compare the old and new values to determine which button has changed the lights. Cool, all good. While I have the tail a State front reading in my loop prodcuer who is corresponding in my loop of consumer. The State of reading front load all the new values in a cluster that is then introduced into a shift register be accessible from anywhere in my code (see here).

    Now my question is, what would my next state that I have the tail? If I have a single "send commands to the gen GIS", in my loop of consumer I have again to determine the value that has changed in order to know what order to be sent (because the initial determination of what has changed in the loop of the producer). However, if I have an individual for each order state that I want to send, my business structure will get very large, very fast.

    Last option is to have a send order status and just write all the data on the only value of a control change, whether it is new or not (which seems an exaggeration).

    Suggestions please?

    For situations of this kind, I would not send a 'State' to the consumer.  I send a '' command. ''   When the consumer receives a command, it determines if this command is executed immediately, or if he completes the task of process and then manages the new command.

    With the command I send one or the parameters.  For your signal generator parameters would probably be something like a bunch of 'control ID' and 'value '.  Control ID would probably be a typedefed enum and value a DBL.

    What ever you decide, think, plan and document before code you.

    Lynn

  • Producer consumer loop

    I'm constantly trying to read data from a file every 30 seconds, for example. Then use the data read to update all my indicators and LEDs on my front. Producer consumer architecture that is suitable for use?  someone at - it an example to follow?


Maybe you are looking for