Stop while from outside loop

Hello
I hava an application with a while loop. Outside this loop there is a subVI, that contains also a while loop. This subVI can be stoped when the main VI loop stops. This works correctly.
But the subvi, can also stop itself, and when it happens I want the main VI loop to stop also.
How can I do this?
(The idea is that the loop in the subvi has to stop the main VI loop)
Thank you very much!!

Hello.
A simple way would be to use global variables, but here is another way. Please note that in this example, the main VI cannot stop the loop in the subVI; since you said you had already achieved that I didn't worry about that part, just the part of the subVI stopping the main VI's loop.
Here are a pair of VIs. When the subVI's loop finishes, the subVI finishes execution (which is a requirement for this method) and changes an indicator in the main VI. The value of this indicator is read by a local variable and used to stop the loop in the main VI.
Hope this helps.
Attachments:
TopLevelVIwithLoop.vi ‏17 KB
subVIwithLoop.vi ‏14 KB

Similar Messages

  • Problem stopping applicationI from middle loop of a three loop vi.

    I have a "Prompt User for Input" in the middle loop of a three loop vi.
    I would like the loop to stop when the user presses "Test 2" on the front panel then checks "input" on the prompt.
    I'm trying to do this using a "User Event". Can anyone tell me what I"m doing wrong?  
    Thanks.
    Solved!
    Go to Solution.
    Attachments:
    TEST.zip ‏156 KB

    add a dynamic stop to the stop event case structure in upper loop by editing the stop event case and add event, dynamic <stop> user event_value change......and you can leave out the stop command in the 2nd test event case structure, wire a false constant to the stop. please mark as solution and kudos those who have helped
    Attachments:
    DH2 Attractive Forcemod.vi ‏74 KB

  • Receiving emails from outside

    Hello,
    I have a exchange 2010 server and two exchange 2013 exchange servers on a coexistence environment. 
    the ex2013 servers are using a single namespace via the F5 loadbalancer ( virtual IP).
    all emails and everything is working fine. I am in a point to do a final cut over. we are sending/receiving emails behind a iron-port spam guard. 
    currently it seems like the ex2013 servers are receiving emails from outside the network( external) via the ex2010 server.
    how can I make the ex2013 receive email from outside without going to ex2010? 
    I can send emails to outside world fine as I have a send connector to the spam-gaurd. 
    do I need to make a new receive connector? if so what IP should I use in the receive connector? 
    Please advice. 
    Thank you
    Sham

    Hi Thanks,
    When I match settings as the ex2010 emails stop coming from outside and they are queued up in the ex2010. ex2013 is not receiving them.

  • How to stop while loop from looping

    Hi, need a little help in the respect to while loops. Basically i have a while loop within an while loop within another while. So what i want to do is run the program within the outer while loop. The problem is that when i start the program it runs once, which is ok, but its the runs again and again and again. I need it to only run once untill i press the inner while loop bolean to set it going and to stop and to restart, but i can not manage to keep the inner loop from initerating. I just wonder if its a problem with the field point? because i know it works, but using a different example. Any help greatly appreciated.
    Thanks Stuart
    Attachments:
    examplealib.llb ‏199 KB

    Use case structures around your middle and inner loops tied to the booleans you want to control the loops. Inside each loop, use a local variable of the boolean tied to the continue terminal of the loop.
    You need to use local variables because an input to a loop (wired from outside the loop) is read only on the first loop iteration. Any subsequent change to a control terminal outside of the loop is not seen by the loop.
    To create a local variable, on the diagram, right click on the terminal of interest, then select Create >> Local Variable. Then right click on the local variable and select Change to Read.
    P.S. You know your stop button is wired to an empty case and doesn't do anything.

  • What is the best way to stop parallel loops at the same time, from any loop?

    If there is a vi with two or more parallel while loops, what would be a good method to simultaneously stop parallel loop execution, from any of the parallel loops? My intent was to try and do this without local variables, so I used notifiers. This seems like an ok method for two loops, but how about for n loops?
    In addition, my code has a flaw. I use an OR block to compare the stop status of each of the loops. This works fine most of the time, but if both loops are triggered to stop at the same time,the boolean result will be false, causing the loops to never stop. How can this be avoided?
    Thanks,
    Curt
    Attachments:
    parallel_loop_w-stop.vi ‏54 KB

    I think you have the right idea, notifiers are one of the better ways to stop parallel loops. You can simplify things by using 1 notifier for everything. I modified your VI to use 1 notifier, it will set the notifier to True ONLY if the loop is stopping, then it stops. The other loop will read the notifier status, and stop based on it the next time it executes.
    I also changed the second loop to stop and notify if it has an error (that is usually a good idea, especally if you have I/O or other things that can cause problems)
    I also changed the switch mechanical action, that will eliminate the problems for your second question.
    The VI's attached are written in Labview 7.0
    P.S. If you have 7.1, the Queues are polymorphic, meaning that the typecast operat
    ions are NOT needed!
    Attachments:
    parallel_loop_w-stop7_0.vi ‏45 KB

  • How do I stop mail from looping the same emails into inbox?

    How do I stop mail from looping the same emails into the inbox over and over again? It does the same thing with deleted messages that keep showing up again and again in multiples even after deleting them. I have made sure my server settings in all email accounts are set to delete immediately once I delete them on my MacBook Pro/IPhone. This issue has severely compromised the efficiency of Mail on my MacBook. Thanks for any help you're able to give me.

    I have tried that but it does not fix the problem.
    The "card" group is not a previous recipient.
    Although not available for editing in Contacts, it is a valid group showing up in the "To" field of Messages, Mail, or any app using the AddressBook.
    Its associated file is automatically created in:
    ~/Library/ApplicationSupport/AddressBook/Sources/<hexaFolder>/MetaData/<hexa>ABG roup.abcdg
    This is why it also shows up in the Spotlight results...
    If I manually remove this file, it gets recreated...
    If I turn off the syncing through iCloud, the entry gets deleted. If I turn it up, it comes back!

  • How can I stop iPhoto from reidentifying faces I have already 'crossed', while still being able to identify and sort new faces.

    iPhoto has detected faces of people I dont know, in my 'iPhoto faces' whenever I click the cross in the corner of the face (when sorting faces) the face temporarily disappears, but once I have uploaded a fresh batch of photos (and want to identify new faces) it automatically re-identifies the old photos that I don't want to have to sort again. How can I stop iPhoto from reidentifying faces I have already 'crossed', while still being able to identify and sort new faces.

    Thank you, that makes sense (I think!) However, I need to be able to tell iPhoto who the people identified in my photos are, does that make sense? How do I identify the people in my new photos without clicking 'find faces'. I know that button searches through my photos to find faces, but it also gets me to the place where I identify the faces as my friends and family, is there a shortcut to get to that place without clicking 'find faces'? That is what I really need, please help!!

  • How do i stop notifications from ringing while im on a phone call on the iphone 4s

    how do i stop notifications from ringing while im on a phone call on the iphone 4s?

    Basel,
    I'm not sure why these folks are having trouble understanding your request. I will dumb it down for them. Is there an option to have the iPhone only provide me with notifications when I'm not on the phone. Having my $800ish phone buzz and interrupt my phone conversation (after all primary function of this iPhone is being a phone) to let me know one of my Facebook friends has challenged me to a game of words with friends. I don't want my iPhone to not notify me at all. It can notify me after the call (again primary function) is complete. Going through menus and turning off notifications all together is absolutely silly. I wouldn't want to have to navigate through the menus and turn them off and then on an then off just to make or receive a phone call. Could you imagine answering you phone with, "hey, just wait I have to turn my notifications off so I can have this conversation." every time you wanted to talk on the phone.
    So yeah. Again not sure why they were having trouble with understanding you. I hope this helps clarify it for them.
    Randy
    Ex Apple tier two support agent.

  • XSL-How to get value of a variable from inside loop-- to the outside loop?

    Pls help
    hi im currently working on this xsl file..
    This works on generating a txt file,my problem right now is
    ' how can i get the value of a variable generated from the inside forloop,
    i have to get the total,sum value of this variables after performing the loop
    ***this is the for loop
    <xsl:for-each select="OutboundPayment">
    <xsl:variable name='id' select='generate-id(OutboundPayment)'/>
    <xsl:sort select="PaymentNumber/CheckNumber" data-type="text" />
    <xsl:variable name='PValue' select='format-number(100*PaymentAmount/Value,"0000000000000")'/>
    <xsl:value-of select='$id'/>
    <xsl:text>D</xsl:text>
    <xsl:value-of select='$DDate'/>
    <xsl:value-of select='$Batch'/>
    <xsl:text>3</xsl:text>
    <xsl:value-of select='format-number(PaymentNumber/PaymentReferenceNumber,"0000000000")'/>
    <xsl:value-of select='format-number(PayeeBankAccount/BankAccountNumber,"0000000000")'/>
    <xsl:value-of select='substring(Payee/Name,1,20)'/>
    <xsl:value-of select='$PValue'/>
    <xsl:variable name='Addend' select='concat($DDate,substring($DAcct,5,5),$Batch)'/>
    <xsl:variable name="LHash">
    <xsl:call-template name="GetHash">
    <xsl:with-param name="A1" select="$PValue" />
    <xsl:with-param name="A2" select="$Addend" />
    </xsl:call-template>
    </xsl:variable>
    <xsl:value-of select="concat('[',$LHash,']')" />
    <!--LHash*i have to get the total amount of this one from the outside loop /---->
    <xsl:call-template name='NewLine'/>
    </xsl:for-each>
    <!--I have to put in here the total value of that LHash/---->
    <!--This is the template on how to get the value of that variable in the inside loop/---->
    <xsl:template name="GetHash">
    <xsl:param name='A1'/>
    <xsl:param name='A2'/>
    <xsl:variable name='TwoSum' select='format-number($A1+$A2,"000000000000000")'/>
    <xsl:variable name='Weight' select='317191314191112'/>
    <xsl:call-template name="WDigit">
    <xsl:with-param name="Cnt" select="15"/>
    <xsl:with-param name="Sum" select="$TwoSum"/>
    <xsl:with-param name="Wgt" select="$Weight"/>
    <xsl:with-param name="Tot" select="0"/>
    </xsl:call-template>
    </xsl:template>
    <xsl:template name='WDigit'>
    <xsl:param name='Cnt'/>
    <xsl:param name='Sum'/>
    <xsl:param name='Wgt'/>
    <xsl:param name='Tot'/>
    <xsl:choose>
    <xsl:when test="$Cnt > 0">
    <xsl:variable name='Multip' select='substring($Wgt,$Cnt,1)'/>
    <xsl:variable name='Factor' select='substring($Sum,$Cnt,1)'/>
    <xsl:variable name='Prduct' select='$Multip$Factor'/>
    <!--xsl:value-of select="concat($Tot,'[',$Cnt,']')"/-->
    <!--xsl:value-of select="concat($Multip,'x',$Factor,'=',$Prduct)"/-->
    <!--xsl:call-template name='NewLine'/-->
    <xsl:call-template name="WDigit">
    <xsl:with-param name="Cnt" select="$Cnt - 1"/>
    <xsl:with-param name="Sum" select="$Sum"/>
    <xsl:with-param name="Wgt" select="$Wgt"/>
    <xsl:with-param name="Tot" select="$Tot+$Prduct"/>
    </xsl:call-template>
    </xsl:when>
    <xsl:otherwise>
    <xsl:variable name="Rem" select="$Tot mod 11"/>
    <xsl:variable name="Chk" select="11 - $Rem"/>
    <xsl:value-of select="format-number(concat($Tot,$Chk),'00000')"/>
    </xsl:otherwise>
    </xsl:choose>
    <xsl:template name='GetTotal'>
    </xsl:template>
    Thanks in advance for those who are willing to help.
    -Leighya

    It would have helped if you had posted your code as CODE but as it is, I could hardly read it. My guess about what you are asking is, if you want a template to return a value, just write that value to the result stream inside the template.
    If that wasn't what you were asking, then please post your code in a readable format.

  • How can I purchase products from the app store while travelling outside my country of residence?

    How can I purchase products from the app store while travelling outside my country of residence? We are from Canada, travelling in the USA and wish to buy a TV series but get a message to buy it from the Canadian store. When we tried to do this we got the same message.

    According to the terms of sale, you have to be in your country of residence in order to make a purchase. I've heard of people able to make purchases outside their country and also of people being unable to do so. It appears that Apple's enforcement is not 100%.
    In order to buy from the U.S. iTunes Store, you would need to have a valid billing address in the U.S., a credit card billed to that address or an iTunes Gift card purchased in the U.S. and be physically present in the U.S. at the time of purchase.
    International copyright law is currently very inconvenient for the consumer.
    Best of luck.

  • How to stop while loop for particular time

                    public void test()
                   new Thread(new Runnable()
                        public void run()
                             //Thread.currentThread().setPriority(Thread.MIN_PRIORITY);
                             System.out.println("test");
                             //System.out.println("test ..."+i);
                             try
                                  Thread.sleep(3000);
                             catch (InterruptedException e)
                   }).start();
            public void startTest()
                    while(i < marquee_Str1.length)
                   marLbl1.setValue(marquee_Str1); //set value to textbox for perticular id
                   marLbl2.setValue(marquee_Str2[i]);
                   marLbl3.setValue(marquee_Str3[i]);
                   test(); // call thread function
                   i++;
    in this code while loop don't stop
    plz help me to stop while loop for certain period by using thread or other technique                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Yes.. the original problem would be your test() method put the sleep in an entirely separate thread of execution. So the thread is created then the method just keeps waiting. The while loop should directly call Thread.sleep... which you have apparently figured out!

  • When importing from my camera or file in Lightroom 5 my pictures are over-exposed by 1-2 stops, while they are well exposed on the camera-screen. How to get the 'right-exposed pictures on the screen?

    When importing from my camera or file in Lightroom 5 my pictures are over-exposed by 1-2 stops, while they are well exposed on the camera-screen. How to get the 'right-exposed pictures on the screen?

    There is an option in your Lightroom preferences on the General tab, "Treat JPEG files next to raw files as separate images". If you have that option checked then Lightroom will import and display both your raw and JPEG files. Are you using active D-lighting on your camera? If you are then you need to turn off that feature.

  • Stop Firefox from telling you, you have not used it in a while and asking to reset it permanetly.

    I need to permanently, FOREVER, stop Firefox from telling me I have not used it in a while and prompting me to reset it. I have 100s of PCs that are frozen and as far as Firefox is concerned they ARE ALWAYS in need of being reset. This must go away. When Firefox starts on these PCs it MUST NEVER ask a question or prompt the user for anything EVER. All the decisions have already been made for the user and that MUST NOT CHANGE.

    Thanks for the reply. I have heard that about the file, but I need to know how to tell Firefox that I don't care about when it was last used etc. I can delete the file, but it will come back. So the real answer I need is how to tell Firefox "not to check" when it was last used in the first place, not what file contains that information.
    For now I will delete the file then, without starting Firefox I will freeze it and hope that will work. But Firefox needs a way that I can just tell it to not care.
    Thanks again for help,
    Ralph

  • Stopping audio of netstream from outside a movie clip

    I have a netstream from media server defined within a movie
    clip symbol which is playing an audio. I need to stop this audio
    from outside the movie clip symbol when a button is pressed.
    I have tried to close the movie clip, but the audio keeps on
    playing.
    Any idea on how this can be done?
    Thanks in advance

    Found to be an issue with 2 buttons with same name.

  • Please,I want to stop users from visiting particular wensites while connected to the internet. How do I configure Firefox to automatically stop users from visiting such dangerous sites?

    Please,I want to stop users from visiting particular wensites while connected to the internet. How do I configure Firefox to automatically stop users from visiting such dangerous sites?

    Thanks, Ronda! I haven't been able to try your suggestion because I fried my router! So I need to get a new wireless router before proceeding.
    (I may start a new thread about getting a new router, but I will look for answers first to my questions and only start one if I cannot find answers.)
    After I get a new router, I will try what you suggested and report back here.

Maybe you are looking for

  • Cannot open Google search results in tab\same window\new window

    Google search results are not opening in the new tab\same window\new window.<br /> It is happening only in Firefox, Internet explorer. It is working fine in chrome.<br /> I have tried many solutions like<br /> 1. cleared cache, history,everything fro

  • Power Saver utility not working/can not uninstall

    When I trying to start Power Saver from the control panel, it writes something like: "Power Saver is nor running. Please first set Power Saver as a default power control scheme in power management". But power saver is already set as my power control

  • Need driver for Ortek keyboard EKB-805PRO

    When I upgraded from 10.4.7 to 10.4.9, I lost the ability to use some special keys on my Ortek EKB-805PRO keyboard. While the F6-F12 function keys work, the Volume+, Volume- and Mute buttons, which I like to use, are inactive. Reinstalling the old dr

  • Product categories for registration

    Dear all, We are going live with the Supplier registered next week. At standard, the 'self registration form' displays the categories short description under the question: "Which Product Categories can you Deliver?" Does anyone know how to change it

  • Problems resizing certain jpegs in cs6

    When I resize certain jpegs in Photoshop and then save, the file size remains the same. It has definately been resized because it shows a new file size in PS. I've never encountered this before until a couple of weeks back. Has anyone had the same pr