Why do i get error 1122 at dequeue element in consumer loop when i hit stop button

when i hit stop button from vi, the producer loop stops, the consumer loop gets an error and stops without reading all the elements and then my check queue status loop continues to run becuase it never goes to 0.
Any help?
Solved!
Go to Solution.
Attachments:
READ SIC AND LOG.vi ‏48 KB

matt198717 wrote:
i believe this is what you were talking about.  If youve got any advice or pointers for this VI please let me know.
1. Your consumer loop should be using the Dequeue Elements.
2. Your consumer loop should actually be releasing the queue in the STOP case.
3. There is also no need for the polling to see how many elements are left in the queue.
4. Your wait in the producer loop shold only be when there is no data in the buffer (you have it in the wrong case).
5. Do not use the value from the Bytes At Port to tell the VISA Read how many bytes to read.  You tell the VISA Read to read more bytes than you would ever expect the message to be.  Let the termination character stop the read.
6. Use a VISA read right after intializing your port to sync up your messages.
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
Attachments:
Serial Port Producer Consumer.png ‏32 KB

Similar Messages

  • Why did I get error 1122?

    I preapred a program to test something but I get error 1122 when I stopped the program. What is wrong with it?
    Egemen
    Attachments:
    Producer-consumer to txt.png ‏106 KB

    newbieeng wrote:
    How can I do that? I have never done something like that before? How can I detect the code and ignore it? 
    The easiest way is probably to use the the General Error Handler function in the Dialog & Error palette. It has an input that lets you ignore a list of error codes; see the help for details.
    newbieeng wrote:
    Edit: When I change the program as in the attachment, the error message does not pop-up. What is the difference? I do not understand.
    Basic dataflow. The error occurs at the Dequeue function. With your change, the error output from Dequeue stops at the case structure. In your previous code, that error travels all the way to the Simple Error Handler, which is the function that pops up the dialog box. If that's not clear, try running your code with execution highlighting (the light bulb icon in the toolbar) and watch how the error travels along the wires when you push the stop button.

  • Why do I get "error code 3: Could not load front panel" when I run my executable​.

    I have a LV 8.5 VI that controls only an agilent spectum analyzer. The agilent VIs call DLLs rather than SCPI commands. I created an application and an installer to load on a non LV machine and ran setup which was successful. When I run the EXE I get "error code 3: Could not load front panel" for each of my agilent spectrum analyzer VIs. I have to click "OK" about ten times, once for each VI. (My executable runs fine on all machines that have labview 8.5) The front panel does load with a broken arrow. The errors listed when the arrow is clicked for all of the Agilent VIs state: Missing subVI AGE444xInitialize.VI (or close.VI or read.VI etc.)
    There is an AGE444x32.DLL in the data folder with the EXE file so I included as support both the DLL and all of the agilent drivers in the application build. Still no luck. I have built the application and installer about 6 times in various forms. I NEED AIR SUPPORT.
    Unfortunately I do not have access to the internet at my jobsite so bear with me.
    Rob

    Hi V-rob,
    I'm glad to hear the executable is working now that NI-VISA is installed.  Thanks for posting the solution!
    Jennifer R.
    National Instruments
    Applications Engineer

  • Why do I get "Error 1 occured at Config Data Registry.vi(get data) invalid object 0" while starting my application?

    Why do I get "Error 1 occured at Config Data Registry.vi(get data) invalid object 0" when starting my application created in LabVIEW 7.1?  I am starting the application in a PXI rack running Windows XP.  I have an executable written in LabVIEW 7.0 that runs without this error.  After clicking the Continue button in the error, the application seems to continue happily.
    Is there something I need to include when I make the executable?
    I would like to understand and eliminate this start up error.
    Thanks in advance.
    BobNorth

    Hi Bob,
    I looked through the program and I figured out where the error is coming from, and potentially what is causing it. In a lot of the cases of the program you are searching a 1-D array for the name of the case, and if you don't find it then it skips the function and gives "Error 1 occurred at Config Data Registry.vi(CASENAME) invalid object 0". I attached a screenshot that shows what I mean. The Search 1-D Array.vi is returning a -1 which means it didn't find the case. The reason I believe this is happening is because the shift register for that array is not initialized. While the other cases "reset" and "register" interact with the array shift registers and most likely create the array you need, if the program defaults to the "get data" case then it will try to run that before registering and won't have an array to search. This would also explain why it only has this problem at first and seems to run just fine after that. To fix this you should either make an initial array and wire it into the shift register or make the "reset" case the default as opposed to the "get data" case.
    Regards,
    Peter W.
    Attachments:
    Config Data Registry.png ‏55 KB

  • Why am I getting error code 1402 when trying to update adobe reader 10?

    Why am I getting error code 1402 when trying to update adobe reader 10?

    Impossible to guess the "why" with so little information, but this may be helpful if you want to solve the problem: Error 1402 | Error 1406 | Acrobat, Reader

  • Why do I get error dw040 ?

    why do i get error dw040 ?

    Please provide us with the following logs.
    You can find them at:
    PS Installer logs
    For Mac:
    Library\Logs\Adobe\Installer
    For Win:
    Program Files(x86)\Common Files\Adobe\Installers
    You can zip all the files together and send us through mail. This would help us in finding the root cause.
    Appreciate your help. Apologize for the inconvenience.
    Regards,
    Ashutosh
    [email protected]

  • Why do i get  error code -3212

    why do i get  error code -3212

    Have you looked at the previous discussions listed on the right side of this page under the heading "More Like This"?

  • Why do I get error OxE800000A

    why do I get error Oxe800000A or E0000225 when i try to hook up my iphone4 to itunes

    There are troubleshooting steps for 0xE errors here: http://support.apple.com/kb/TS3221.

  • Why do I get Error 32812?

    I wrote a VI, which worked perfectly.
    After addressing the cFP from the network instead of from the PC, some Read tags gave Error 32812.
    For one of them I deleted them and wrote them again, and the error was recovered. But then it appeared for another module.
    From MAX I can perfectly read the channels. I also tried to "find items" again.
    What could be the reason and the cure?
    thanks
    Francesca

    Dear Francesca,
    quite a few documents exist on your problem.
    I'd start checking into them.
    You can use the keyword 32812in the "seach"  field in www.ni.com and find 
    Why Do I Get Error -32812 When I Read or Write to a cFP-180x from a cFP-2xxx?
    http://digital.ni.com/public.nsf/allkb/80A4EF3A7A1784D6862573F4000B20C5
    Why Do I Get Error 32812 From Some FieldPoint Modules But Not Others?
    http://digital.ni.com/public.nsf/allkb/9DB72AFCBC02D7D986256FC10055D65B
    Error 32812 From FieldPoint VIs
    http://digital.ni.com/public.nsf/allkb/02EB73D02715981A8625682B00774F8F
    Best regards  
    FiloP
    It doesn't matter how beautiful your theory is, it doesn't matter how smart you are. If it doesn't agree with experiment, it's wrong.
    Richard P. Feynman

  • TS3694 Why am I getting error code 3194 when i try to restore my ipod?

    Why am I getting error code 3194 when I try to restore my ipod touch 4th generation

    This device is not eligible for the requested build: Also sometimes displayed as an "error 3194." If you receive this alert, update to the latest version of iTunes. Third-party security software or router security settings can also cause this issue. To resolve this, follow Troubleshooting security software issues.
    Downgrading to a previous version of iOS is not supported. If you have installed software to perform unauthorized modifications to your iOS device, that software may have redirected connections to the update server (gs.apple.com) within the Hosts file. First you must uninstall the unauthorized modification software from the computer, then edit out the "gs.apple.com" redirect from the hosts file, and then restart the computer for the host file changes to take affect.  For steps to edit the Hosts file and allow iTunes to communicate with the update server, see iTunes: Troubleshooting iTunes Store on your computer, iPhone, iPad, or iPod—follow steps under the heading Blocked by configuration (Mac OS X / Windows) > Rebuild network information > The hosts file may also be blocking the iTunes Store. If you do not uninstall the unauthorized modification software prior to editing the hosts file, that software may automatically modify the hosts file again on restart. Also, using an older or modified .ipsw file can cause this issue. Try moving the current .ipsw file, or try restoring in a new user to ensure that iTunes downloads a new .ipsw.
    Error 3194: Resolve error 3194 by updating to the latest version of iTunes. "This device is not eligible for the requested build" in the updater logs confirms this is the root of the issue. For more Error 3194 steps see: This device is not eligible for the requested build above.
    http://support.apple.com/kb/TS3694#error3194
    Also see:
    iPhone Error 3194 - How to Fix iTunes Error 3194?

  • Why do I get error 150:30 when I try and send a photo to Elements 8?

    Why do I  get error 150:30 when I try and send a photo to Elements 8 from a PC with windows8?

    My wife had this problem for the past few days for a specific phone number. These instructions fixed it -- without having to restore from backup or contact the carrier.
    http://www.timothydeblock.com/blog/2014/5/12/fix-message-sent-using-invalid-numb er-of-digits-msg-2114
    Open Contacts -> select the contact -> select edit -> scroll all the way to the bottom and delete contact (delete multiple entries of the same phone number, my wife had five).
    Open the Messages app -> select Edit -> select the red circle and then select delete. Do this for both the person and the messages you received.
    Open the Settings app -> scroll down and select Messages -> turn off messages, by selecting the switch, and any other options turned on.
    Turn off your phone and then turn it back on.
    Go straight to messages and compose a new message and put in the phone number of the person you're trying to text. Send and that person should receive the text message. Add the person to your contacts and go back into message settings to turn on any other options you want on that you turned off.
    John

  • Why am i getting error 150;30 when i click on edit

    Why am i getting error code 150:30 when I click on edit in Photoshop Elements 8. Says my licencing has stopped working.

    Exactly, and if using IE the error code doesn't appear and the media with play straight away, so it does seem to be directly related to Firefox...

  • TS1538 Why am i getting error 9006 when trying to restore my ipod 5th gen?

    Why am i getting error 9006 when trying to restore my ipod 5th generation?

    Configure your security software
    Check your security software and settings, which can block ports and prevent connection to Apple servers during update and restore.
    Common errors: 2, 4, 6, 9, 1000, 1611, 9006, 9807, 9844. Sometimes as a result of this issue, a device might stop responding during the restore process.

  • Why am i getting error 5002 when trying to redeem a UV movie purchase?

    Why am i getting error 5002 when trying to redeem a UV movie purchase?

    Sharonc21 wrote:
    If one is downloading directly to the iPhone via WiFi, it doesn't matter what version of iTunes is on the computer.
    I decided to sync my phone to Outlook via iTunes.  First thing, iTunes discovered that 7.0.3 was not on my phone.  It asked if i wanted to install it.  I said, "yes", and VOILA!! 7.0.3 is now installed on my iPhone.
    So therein is the answer.  Have no idea what bug is in there to keep it from loading to some phones directly via WiFi, but obviously, it is something!!
    There is no bug.  While you can update your iOS via wi-fi, it's recommended to do so via USB & iTunes.  Depending on your wi-fi connection & singal strength, you can get errors.  That's not a function specifically of the device.

  • TS1424 Why am I getting error 11222 when trying to access the store?

    Why am I getting error 11222 when trying to access the store?

    The 11222s can sometimes be associated with LSP issues.
    I'd try the following document:
    Apple software on Windows: May see performance issues and blank iTunes Store
    (If there's a SpeedBit LSP showing up in Autoruns, it's usually best to just uninstall your SpeedBit Video Accelerator.)

Maybe you are looking for

  • PDF form responses coming back uneditable

    I have created a lengthy form in InDesign (v.9.2) for a client, which I have exported to PDF then extended in Acrobat Pro (11.0.06) under File > Save as Other > Reader Extended PDF > Enable More Tools. This makes the form savable (if that's a real wo

  • Macbook no sound???

    HI everyone just want to see if anyone can help me in this situation: My Macbook was working fine before (in terms of sound) but when I got back home all of a sudden my speaker is not working.... went to the sound function in system preference under

  • Unity Virtualization Question

    Hello, I'm in the planning phase of upgrading Unity to 8.X and moving into a virtual environment.  The virtual environment is Cisco UCS M2 B series blades, the blades that are dedicated to Collaboration apllications have 64 gigs of memory and 2 Intel

  • Sendmail Tcl Error Message

    Hello Community, I'm carrying out some testing with the sendmail.tcl posted here. Unfortunately, I keep on getting the following error message: R1#event manager run sendmail.tcl Embedded Event Manager policy sendmail.tcl not registered with event non

  • Burn Time I DVD 5

    I dumped some digital footage from I Movie into I DVD, nothing fancy, approx 29 chapters no more than 1 minute each, no slides and a regular theme. The stats said 2.6 gb of 4 gb. I noticed it took almost 2 1/2 hours to go through the burning process.