Why do I get error 1122 to dequeue element loop of consumer when I hit the stop button

When I hit the stop button in the vi, stops of producer loop, the loop of consumer gets an error and stops without having read all the elements and then my status check queue loop will continue to run because he never goes to 0.

Any help?

matt198717 wrote:

I think that's what you were talking about.  If you have any advice or pointers for this VI please let me know.

1. your consumer loop should use the Dequeue elements.

2. your consumer loop should actually be freeing up the queue in the case.

3. it is also useless for the polling stations see how many items is stored in the queue.

4. your wait in the loop of producer should be that when there is no data in the buffer (you have it in the case of bad).

5. do not use the value of the bytes to the Port reading VISA tell how many bytes to read.  Say you reading VISA to read more bytes that you always expect the message to be.  Let the stop character stop playback.

6. use a VISA reading just after the initialization of your port to synchronize your messages.

Tags: NI Software

Similar Questions

  • Why I can't edit any wiki site using my Firefox? When I hit the edit button, all the text disappears.

    I use Firefox 14.0.1 and every time I try to edit any wiki media Web site all of the text that was there has disappeared. I have no problem with other browsers.

    Hello

    You can consider the function of Reset Firefox via help (Alt + H) > troubleshooting information.

    (To return to the previous mode, you were using, close the new profile (i.e. Quit Firefox), start Firefox and choose the default user profile.) Alors_que Profile Manager is open, you can also remove the reset your profile (the one containing the random numbers) or the old profile, as appropriate).

    Profile management

    Profiles Howto

  • Why do I get a - 1712 cannot be opened in Acrobat Reader when I export the document "as" pdf "for Safari on Mac?

    Why do I get a - 1712 cannot be opened in Acrobat Reader when I export the document "as" pdf "for Safari on Mac?

    This is an error "timeout". I wonder if Acrobat Reader starts very slowly. Perhaps from the app first will speed it up.

  • In Firefox 18.0.2.when, I hit the Home button, it opens a new tab. Why?

    This does not always occur but only recently started. I tried to reset my homepage nothing helps.

    The reset Firefox feature can solve a lot of problems in restaurant Firefox to its factory default condition while saving your vital information.
    Note: This will make you lose all the Extensions, open Web sites and preferences.

    To reset Firefox, perform the following steps:

    1. Go to Firefox > help > troubleshooting information.
    2. Click on the button 'Reset Firefox'.
    3. Firefox will close and reset. After Firefox is finished, it will display a window with the imported information. Click Finish.
    4. Firefox opens with all the default settings applied.

    Information can be found in the article Firefox Refresh - reset the settings and Add-ons .

    This solve your problems? Please report to us!

  • Why the STOP button stops not timed loop.

    Hello world

    I had a rather complicated code launched against me. I had to change program action unique (and many other things) when ACQUIRING a button has been clicked making timed measurements. I was able to add the time... but I want the loop to stop once you click on the STOP button.

    I have attached a very simplified version of my code.

    So if you start and press the ACQUIRE the program generates random numbers (to simulate the measure) and records them with a device ID. The program stops once the total is for instance in the default settings after 20 sec.

    But it does not stop when you press the STOP button. MY QUESTION: why not?

    FOR INFO:

    In my actual code, there are 10 events instead of only 1.

    It doesn't have to stop immediately, inbetween iterations (because I already tried to include the timed stop Structure VI and it did not work either).

    I also used the execution to highlight, but it did not help me.

    Thank you for any help or suggestion!

    Lisa

    Lisa,

    First of all, thank you for explaining clearly what your problem and to present a simplified program.

    The problem with your program is very simple. The loop inside the structure of the event begins when the acquisition: Mouse Down event occurs, which seems to be what you wanted. The default condition for the case of the event is "front Lock (defer the treatment of the actions of the user) until the end of the occurrence of the event." This is controlled by a checkbox at the bottom of the evetn installation dialog box. What this means is that the stop button is not recognized until AFTER the event is complete.  BUT the case of the event cannot complete until the while loop stops.

    The Solution: Move the loop outside the case of the event.  Generally speaking, event must not contain any code that could take more than a few milliseconds to run and certainly should not depend on the user's other actions to complete.

    Look at the design of producer/consumer models (events) for advice.  Also learn how to use queues to pass data between loops rather than local variables.

    Lynn

  • "Why what I get"Error contact Service"Please try again later.

    Original title: Windows Media Player.

    "Why what I get"Error contact Service"Please try again later.

    Hello

    Welcome to the community forums of Microsoft and thanks for posting the question. Please answer a few questions to refine the question.

    1. Once you get this error message?

    2. are you aware of changes to the computer before the show?

    3. What is the full error message?

    4. what version of Windows Media Player installed on the computer?

    "Your question contains all the required information necessary for us to help you. Please re - write your question, this time make sure you have all the information necessary and we will try to help. »

    See this link for more information on:

    http://support.Microsoft.com/kb/555375

    Please answer the questions so that we can help you solve the problem that you are facing on the computer.

  • Why im I getting errors

    Why do I get errors with this code?

    I do not understand why!

    var rightNow = new Date();

    var msRightNow = rightNow.getTime ();

    Challenge of var = 5 * 24 * 60 * 60 * 1000;

    var theNewDate = new Date (finalTime);

    Console.println ("5 days from now is:" + theNewDate.toString ());

    Sorry, I don't see a mistake now. You set the variable finalTime anywhere. I think that you wanted to do something like this:

    var rightNow = new Date();
    var msRightNow = rightNow.getTime();
    var fiveDays = 5 * 24 * 60 * 60 * 1000;
    var finalTime = msRightNow + fiveDays;
    var theNewDate = new Date(finalTime);
    console.println("5 days from now is: " + theNewDate.toString());
    
  • Why do I get error oxc000007b in lightroom

    Why do I get error oxc000007b and is there a fix

    This thread seems to indicate that the way to solve the problem is to reinstall your operating system

    http://forums.Adobe.com/thread/847683

  • I get error code 0 x 80070005 that reads "system restore failed during the restoration of the registry since the restore point.

    Original title: Windows 7 system restore always fail.

    I get error code 0 x 80070005 that reads "system restore failed during the restoration of the registry since the restore point.  I don't have Norton AntiVirus.

    If anyone can help solve me this problem I would be very grateful.

    Thank you for your response.  I forgot to mention in my first post, I tried both methods without success.  However, I finally understand how to solve the problem that led me to want to do a restore of the system in the first place. for now, I am therefore able to avoid a system restore.

    Thanks again.

  • Just upgraded to lightroom lightroom 6 5.  When I push the download button I get error: 413 header length too large.  Do not download.  What can I do?

    Just upgraded to lightroom lightroom 6 5.  When I push the download button, I get error:

    413

    Header Length too Large

    Will not download...

    Hello

    I would ask you to try another web browser and let us know if problems.

    Kind regards

    Hervé Khare

  • Why the STOP button does not stop this vi?

    Hello

    I took an example of Labview 2011 called "soul hollow period-Low Freq 1 Ctr.vi. This example vi measures one period, but, I want to measure the period over and over again, so I put it in a WHILE loop, but the STOP button does not stop at the vi.  Instead, I have to use ABORT to stop the vi...

    How can I stop this vi?

    Dave

    It does not replace the time-out.  The while loop is a separate beast from the meter reading.  You wouldn't want your loop due to always make you miss the error messages, would you?

    Usually just clear the error message of time-out on the counters.

    You get the message twice because the loop runs in fact twice.  The first time the stop button is read as false as soon as the loop begins.  Then you click on it.  At the same time that it takes 10 seconds for the timeout counter to occur - when he does it gives you the error.  Then, the loop runs again.  This time it reads the key stop as true, because you clicked on it during the timeout of 10 seconds of the last loop.

    A time loop allows everything inside to complete execution before the end, then you will have to wait for an another timeout of 10 seconds to occur which produces another error.

    Unless you need a measure of very, very low frequencies I set your time-out to a more reasonable number and simply erase the mistake if it matches 200474.

  • Why the 'Stop' button is gone in version 7.0.1?

    In the past Iwas able to click on 'stop' when a page not loading after a period of time. In the 7.0.1 version the 'stop' button is ono is more available, or at least I can't.

    Why it has been removed in version 7.0.1. and if not removed, where is he?

    Glad to have helped, thanks for posting back, solved messages appear in searches and help others with similar problems.

  • I open firefox, I get my home page more 3 more. Whenever I hit the home button I get 3 more information on the tab bar and it is based in 3 whenever I hit the home button. It's never happened before. What should do?

    As I said whenever I open firefox I get 3 additional tabs to the home page. After that, whenever I hit the home button I get 3 more. Very fast, I got 1 million tabs and capabilities. I went to internet explore and connected and I have no problem. The only thing I can get from that is that I have a problem with firefox. I have been using firefox for a couple of years too.

    Thanks, Larry

    See https://support.mozilla.com/en-US/kb/How%20to%20set%20the%20home%20page and change your homepage settings

  • In iPhoto, when I hit the info icon, I get a note of gobbledygook.

    In iPhoto, when I hit the "info" icon, I get a note long gibberish.  The button 'edit', 'create', ' add to ' and 'share' icons work OK.

    What version of iPhoto? Is OS X 10.5.8 as you say correct for your OS? Post a screen shot of your 'gibberish' - take the screenshot and click on the camera icon in the top bar of the composition to include window off screen

    LN

  • Why Satellite Pro A300 does not start when you press the power button?

    Suddenly my new Satellite Pro A300 does not start correctly when you press the power button. The situation is the following: when I press the power button is displayed the opening of Toshiba (Leading Innovation) and the disappers image quickly. Then there is a black screen for about 30 seconds. There is a rectangular frame with the text Microsoft Corporation under. And nothing happens however long wait.

    In order to get with the trial starting I then shut down the computer by pressing the power button until the computer turns off. ("The hard way to close")
    Now, I press the power button shortly to turn on the computer. Then, the computer starts normally with the photo to open Toshiba and after a few seconds, I wonder to open the computer in safe mode or in normal mode. I now choose to open in normal mode and the computer opens normally and is ready to work.

    What should I do to get a normal departure procedure?

    When the laptop starts normally (after choosing normal mode) stop your laptop properly using START > shut down option. Next launch should be normal.

    When the OS is moving towards the low irregularly will always ask you how to start this new (secure or normal mode).
    The same thing happen on my Satellite A300.

Maybe you are looking for