One stop button to control multiple loops?

I want to use on stop button to stop mutilple while loop at the same time.  But if I put the stop button outside the while loop, it is functional.
Is there any way to do that?
Thanks

cguan wrote:
But if I put the stop button outside the while loop, it is functional.
 I don't think "functional" is the right word here.
I often use event structures, e.g. as in my example posted here. This allows you to keep latched mechanical action for the stop button.
For a queued state machine, you would use the error to stop the loop that waits for the queue. Here is an example for that.
The most appropriate method really depends on the situation. Can you post some code? 
LabVIEW Champion . Do more with less code and in less time .

Similar Messages

  • Need to stop with only one "stop button"

    I have two vi's. One that monitors temperature and the other sends a D/O signal. They both work fine on there own but when I merge them into one vi I have to press both stop buttons for the vi to stop.  I would really like to only have one stop button in the final vi.
    Any suggestions would be appreciated.
    Thanks in Advance,
    Jason
    Attachments:
    dig_output_with_temp1.vi ‏127 KB

    Jason,
    You can edit the stop event case to use the same stop button as the temperature loop.  Right click the event structure and select "Edit events handled by this case", then select the control named "stop (F)".  Then you can delete the other button labeled "stop".
    -Chris

  • One pair of radio buttons to control multiple text objects - Designer 8.0

    Greetings - a big thank you in advance for any assistance. I have often found answers to my problems on this forum, but have been unable to find an answer to the following.
    The short of it - is it possible to make a pair of radio buttons control the visibility of multiple text objects with the same name(I have had success in manipulating only a single text object with one pair of buttons)?
    The long of it - I am trying to make a form bilingual based on the value of a radio button group to control the visibility of the text object in the selected language. When the user selects the language they wish to see, all the text objects in the form switch to that language. I am working with a dynamic PDF.
    I have succeeded to a very limited extent in manipulating one text object by overlaying text objects in both languages, setting one object to "invisible" as default, and controlling that text objects visibility with the following JavaScript in the click event of the radio button group:
    ----- form1.#subform[0].ENG_JPN::click: - (JavaScript, client) -------------------------------------
    if (ENG_JPN.rawValue == 1)///1 equals the value of on
    {English.presence = "visible";}
    else
    {English.presence = "invisible";}
    if (ENG_JPN.rawValue == 2)///2 equals the value of on
    {Japanese.presence = "visible";}
    else
    {Japanese.presence = "invisible";}
    endif
    The problem is I need to manipulate the visibility of all text objects with the same name on the form with a single radio button group. I have tried writing the code as one does for the sum of a repeating field, ie. English[*].presence etc. however I get a C++ error in preview.
    Any ideas are greatly appreciated. I am truly stumped - thank you for your time.

    To access objects with the same name you need to deal with occurance numbers. If your object is called TextField then the 1st occurance will be TextField[0], the second occurance will be TextField[1] etc.....
    The issue is that the [] in javascript are interpretted as an array element so you have to use the syntax: xfa.reolveNode("string") to get to your object names. In your case you would use:
    xfa.resolveNode("TextField[1]").presence = "visible"
    This string syntax allows you to use a var to hold the index number and is very useful with for loops where you want to set large numbers of objects. So if the index was held in the var i then your syntax would be:
    xfa.resolveNode("TextField[" + i + "]").presence = "visible"
    If the objects are in a repeating subform then the occurance numbers are on the subform and not the object. You can always get the expression to use by app.alert(objectname.somExpression). This will return the expression that you need to create.
    Make sense?

  • How to use one boolean button to control many boolean buttons?

    I would like to create a LabView control interface with boolean buttons.
    As my attachment picture shown, there are four boolean buttons.
    The button1 is the main power, if I press ON button1, other three
    buttons also turned to ON at the same time.
    How do I build up the LabView program in the block diagram?
    What should I do???
    Attachments:
    booleans.bmp ‏722 KB

    Controls and indicators function as variables. In a text based language, you could just write the name of the variable again. In LV, since each control only has one terminal, you need local variables to do this. To create a local variable, right click on the control and from the popup menu select Create>>Local Variable. You can have a local as read or write. Create a local for each of the buttons and wire the data coming out of the first button into the locals.
    There is something that is very important to understand here - when you use locals, you can disrupt the dataflow nature of LV and create race conditions. For example - if, after fixing your code, you were to click on one of the buttons, to set it to F, it would immediately be set back to T by the running code. This can be very dangerous. Also, I see you're using the continuous run mode. You should use a loop instead. Try looking for some LV by searching google for "Labview tutorials. Also, here's one you can start with.
    Try to take over the world!

  • How do I use two DAQ cards in one Labview code? Current I'm getting error " error 200558 occurred at DAQmx Create Channel.vi. One task cann't contain multiple independent devices". Can someone help me?

    The two DAQ cards are NI PCI-6070E & NI PCI-6052E. The Labview I'm using is labview 7 Express and the Window system is Window XP. I'm using NI SCXI-1000 chasis and SCXI-1102 & 1102B two modules plus a feedthrough SCXI-1180. 1102 is connected through SCXI-1349 cable to DAQ card 6052E while 1102B is connected through SCXI-1349 cable to DAQ card 6070E. SCXI-1180 is connected to 6070E through SCXI-1349 adaptor on the back of 1102B.

    Sarah, thank you for replying my question. It seems that I'm making progress everyday (smile). I'm able to run the test using both daq cards in my code now. But as I'm moving forward, I'm getting new questions too. How do I use one STOP button to control both tasks and how can I save data into one single file?
    I attached my code here hoping you can get the specifics on my application by looking at the code. Thanks very much!
    Thanks.
    Attachments:
    DAQmx_Task_Example_plus_voltage_2.vi ‏416 KB

  • Ending time delay with stop button

    I am trying to create a stop button to control multiple vi's at once. A problem is that my subvi has a time delay. To solve that problem the time delay is divided into multiple time delays so that I can interrupt it with a stop button.I am building off of Al S's example on the forums found here. I tried adding a global variable but it is not working. 
    Any ideas? Thank you
    Solved!
    Go to Solution.
    Attachments:
    Delay.zip ‏19 KB

    I wanted to thank everyone for their incouragement to learn notifiers. So I finally did and notifier were the solution I was looking for. I found help from DianeS with her 1st post here and from WayneS1234 with their 1st post here. 
    I am posting my code to show what I learned. I think it might help someone else. Note that this is like a block diagram with working notifiers of my larger project that I am working on.
    Attachments:
    Main VI Notifier.vi ‏21 KB
    sub VI Notifier.vi ‏14 KB

  • How do we link multiple stop buttons to make one master stop button?

    I am building a program that has multiple loops running simultaneously. How do I create a master stop button/link the multiple stop buttons to one? Right now I have 14 different stop buttons and would like to control them all with one main stop button, that way I won't have to hard stop the program, and for when we compile the program into a stand alone running program, the user will be able to have a master stop button available? Any help would be appreciated. Are there any available tutorials?

    You can use a local variable to do that, but remember, use local only if you have to.  For the switch, remember to change the mechanical action to switch until released.
    Yik 
    Kudos and Accepted as Solution are welcome!
    Attachments:
    Example_VI_BD.png ‏3 KB

  • Stop button reference

    Hi, I have a VI with several case-structures and while-loops and nested while loops ... and ONE stop-button. i want to stop the loops with this button. how do i do that?
    i know that i could do it somehow with a lokal variable and references to it, that are connectet with the stop-terminals. i attached a small screenshot where you can see how i tried it, its not working ("Wert" = "value").
    Johannes, Grundig, Germany
    Attachments:
    VI_stop_referenz_problem.gif ‏5 KB

    Hello Johannes,
    you are using a Global "stopp" button. So just use this
    global in every instance (copy and paste!). Or you can create a Stop-button control at the front panel and use it with some local variables (context->create->local).
    See example pic: control is in the upper left corner, several locals all over...
    Best regards
    Gerd
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome
    Attachments:
    Image2.png ‏19 KB

  • Dynamic event multiple loops

    I'm trying to see if I can use one Dynamic User Event to control multiple Event Structures. It seems that sometimes once a dynamic event occurs and its "interrupt" is answered by an event case, other VIs only have a short amount of time (<50ms) to reach their event case state for accepting this event otherwise the event seems to be cleared and the other VIs are oblivious that the event even occured.
    My Question: Is it possible to use one dynamic event to control multiple Event Structures reliably?
    A previous post somewhat speaks of this issue but does not provide a solution or anything insightful.
    http://forums.ni.com/ni/board/message?board.id=170&message.id=223495&query.id=135563#M223495
    I've included an example of my issue
    Attachments:
    DynamicUE.zip ‏61 KB

    Thanks to both of you. I found the answer to my question in the second posted link. "the common, correct use case is to have one Event structure per dynamic event registration". I tested this out with the previous attachment by registering the User Event refnum from the ESTOP functional global to another Event Registration node. I then ran this refnum to the top loop. (instread of the top loop sharing the registration refnum with the middle loop). Now I can put a delay of 2000+ ms and not even miss an event. cooool. This will probably NOT be my final solution but its good to know in the future.
    Most likely I am going to design each of my main VIs to have a main while loop with a User Event Structure listening for dynamic events. Associated with each of these VIs will be a functional global which contains its User Event Refnum and Registration Refnum. This functional global will act as a gateway into the associated VI for other VIs/Subvis to use. This will follow the "one Event structure per dynamic event registration" rule while keeping my API organized and allowing room for scalability by simply adding more functional globals in the future.
    Just putting this info out there for other users.
    Thanks again,
    Craig

  • Create Run And Stop Buttons on Front Panel, rather than using the toolbar run/stop

    I would like to make my vi more user friendly by creating start and stop buttons on the front panel. I havent found much info on how to create them. I have created a boolean stop button to stop my FOR LOOP.
    -Chris

    Creating the buttons is easy - just select the style you want from the Boolean palette. What you need to do is change your diagram and the VI properties. To have a VI automatically start running when opened, open VI Properties by selecting that under the File menu or right clicking the VI's icon. Select Execution and check the Run when opened box. If you need the user to enter some data or change parameters before running the program, there's a couple of ways to go about it with a front panel Start button. You could have a separate while loop with just the start button in it and connect an output of that to a main while loop. This creates data flow and ensures that the start while loop executes before the main. You could create a simple state machine. T
    here's a couple of shipping examples. Just open the Example Finder and enter state for the keyword. You could also use the Event structure. Again, there are several shipping examples. Instead of doing a search, you could also browse the Example Finder and look at what's underneath the Building User Interfaces topic.
    p.s. I don't think you created a stop button for a for loop as there is no way to stop a for loop. What you can stop is a while loop.

  • How to use one single boolean button to control a multiple while loops?

    I've posted the attached file and you will see that it doesn't let me use local variable for stop button, but I need to stop all the action whenever I want but more than one single button on the front panel would look ugly... The file represents the Numeric Mode of
    HP 5371A. thanks for your time
    Attachments:
    NUMERIC.vi ‏580 KB

    In order to use a local variable, you can change the mechanical action of stop button (Switch When Pressed will work), or create a property node for it and select values. You'll also have to do a lot of work changing those for loops into while loops so that you can abort them.

  • Need ONE Button That Controls Audio/Caption for Multiple Movies

    Captiate Version: 3
    Flash Version: 9
    We created an online course using Captivate 3. The shell is HTML and the captivate (.swf) is embeded to show the content. Because the content inside the captivate movies were too large we had to break up the course into separate pages for loading purposes.
    For example:
    HTML Page            Captivate File
    page001.html         page001.swf
    page003.html         page003.swf
    page004.html         page004.swf
    Now we need a way to use ONE Button to control the Audio/Caption for ALL the movies. The button would be included seperately in the HTML shell along with Captivate movie.
    Is this possible? If so please let us know in detail how?
    We're open to other ideas. We are somewhat familar with using Captivate variables ect is required.

    You can control Captivate SWFs via JavaScript using the CaptivateController. It allows you to control all the standard Captivate variables from HTML.
    http://pipwerks.com/2010/08/23/captivatecontroller-updated-to-support-adobe-captivate-5/

  • Controlling multiple movies with one button

    Hi flash gurus,
    I have 4 movies of the same length running on my stage in the
    FLV playback component, with different instance names. I also have
    a single play/pause component. I want all of the movies to play
    together and unpause/pause when I press the play/pause button.
    However, I have only been able to get the play/pause button to
    control one of the movies (the last one listed in the
    actionscript). I'm using the following code to attach the
    play/pause component to the FLV playback movie:
    FLV_instance_name1.playPauseButton = PlayPause_instance_name
    FLV_instance_name2.playPauseButton = PlayPause_instance_name
    FLV_instance_name3.playPauseButton = PlayPause_instance_name
    FLV_instance_name4.playPauseButton = PlayPause_instance_name
    When I use this, the play/pause button only controls the
    FLV_instance_name4 movie. How do I get it to control all 4 moives?
    Any help is much appreciated. Thanks!

    PS, I'd also prefer for the controls to be detatched from any of the viewers, if possible. Thanks!

  • Is it possible to create run and stop button on the control pannel instead fo using the ones on the tool bar?

    I have created a program which runs to all my specifications. The final thing I'd like to do is to be able to run it from the contrl panel.
    Can i create a run and stop button on the control panel or am i limited to using the little white arrow button on the toolbar?

    When you say Control Panel are you referring to the Front Panel of your VI?  If so then yes you can have the program start automatically upon being opened and close with a button push on the Front Panel.  Let me know if this is what you were looking for.
    CLA, CLED, CTD,CPI, LabVIEW Champion
    Platinum Alliance Partner
    Senior Engineer
    Using LV 2013, 2012
    Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved.

  • How do I get all the control buttons in one place in 3.6.16, like they used to be in previous versions? Having the refresh and stop buttons between address and search windows, and the home button to the far right is awful.

    In 3.6.16, the buttons are all over the place. In previous versions, the forward, back, refresh, stop and home buttons were all together. In this version, the refresh and stop buttons are between the address and search windows, and the home button to the far right.
    I would love to have them all together as they used to be - much more user friendly that way. I have tried installing alternate themes, but the coding of this version over-rides the themes.

    Firefox 4.0 has a combined Reload and Stop and Go button that appears at the right end of the location bar.
    To restore the Firefox 3 appearance you can use these steps:
    * Open the "View > Toolbars > Customize" window to move the Stop and Reload button out of the location bar.
    * Move the Reload and Stop buttons to their previous position at the left side of the location bar.
    * Set the order to "Reload - Stop" to get a combined "Reload/Stop" button.
    * Set the order to "Stop - Reload" or separate them otherwise to get two distinct buttons.

Maybe you are looking for

  • Solution Manager EWA - cannot create session in satellite system

    "Hi, I want to configure EWA self service using Solman 4.0. I succesfully did the following : a. Maintained SMSY and create the required trusted RFC connections from SM to satellite system. All connection and authorization passed in SM59. I used SAP_

  • WiFi Card For Zire71

    I think I have seen postings here for WiFi SD Card for Palm Zire72 connection. Is the same card compatible with the Zire71? I am trying to find out if my old Zire71 could get Internet connection by using a similar card. Post relates to: Palm TX This

  • Using Laptop as backup

    I would like to backup my itunes from my PC to my Laptop. I have a shared network, but I would like to reproduce my itunes program on the Laptop from time to time without duplicating songs etc, just creat an exact copy of library and playlists. The a

  • Saving String-Array in mySQL DB

    Hello. How can I save an dynamic array in a DB, without looping over the content. I think serialization is the key word. Can anybody give me further information, pls? Thx an lot. Regards, Philipp

  • Gridlayout error in dialog

    Hello, I wondered if anyone could advise, in this dialog code I was hoping the first panel to display the labels and textfields as 2 columns, with 3 rows. The second panel works fine, could anyone see the problem in the first? Thank you The first pan