Stop in subvi also aborts execution of mainvi

IS there any function that allows you to stop the mainvi's execution via the subvi i.e. stop the running of the program entirely?
Thanks

There is no generic function for doing that, except the Quit LabVIEW node and it shutsdown LabVIEW completely. That will work, but like a friend of mine once said:
"You can sucessfully stop you car by running it into a tree -- but there can be unintended consequences..."
The problem is that if you quit LV in a subVI there is no orderly shutdown, execution stops immediately. And depending upon what your code is doing this can be a Very Bad Thing.
What exactly is it that you are wanting to accomplish? How is the program in question structured?
Mike...
Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion
"... after all, He's not a tame lion..."
Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

Similar Messages

  • How to stop a period counter in a while loop without using abort execution%3F

    I am using a NI x series 6343 andcounting pulses, but when i try to stop the counter with a boolean operator nothing happens, ihave to go and use abort execution, 
    Help

     the stop sign does not do anything, it just stops after the timeout.
    Which is exactly what you're asking it to do.
    The STOP button is not a magic ABORT function.  It's a simple TRUE/FALSE variable.
    The way you have it set up is:
    repeat
       Get some data (Timeout = 10 sec)
       Process the data
    until STOPped
    It's going to check that STOP value (is it pressed or not) ONCE, sometime during the loop.  Maybe before your GET DATA, maybe during, maybe after - you don't know.
     Whenever the GET DATA thing returns (after 10 sec, or after getting some data), then it willl use that value and decide to loop again, or to stop.
    If you want to abort the GET DATA operation, you have to find another way.
    One way is to use a shorter timeout.  Do you have to track it down to 1 pulse every 10 sec?  If not shorten your timeout and go from there.
    Another way is to find a way to abort the operation.
    Again, I'm not familiar with the EXPRESS stuff you're using, so I don't know the details.  In all my 26 years of LabVIEW programming, I've never once used EXPRESS stuff.
    Using the regular NIDAQ stuff, you would
    INIT a task
    START a task (Task ID)
    repeat
       READ a task (TaskID, timeout = 0.1 sec, or something)
       if TIMED OUT
           do nothing
       else if ERROR
           announce error
       else
           Process data
       end if
    until STOPPed or ERROR
    CLEAR task(Task ID)
    It's more complicated, but you have more control. 

  • Howto stop a subvi

    Hi,
    I have a question, I am running a SubVI within a control VI (kind of wizard like with subpanels) and I want to use an abort button in the main VI to stop the SubVI thats still running (just like the stop button within labview (next to run and loop)) Can someone help me...
    thnx
    Bart bakels
    Labview CLD , Engineer/Manager
    Promedes and DSM
    using LV 7.1, 8.0, 8.2, 8.5 and 2009 SP1
    http://www.promedes.nl

    BartB wrote:
    Hi,
    I have a question, I am running a SubVI within a control VI (kind of wizard like with subpanels) and I want to use an abort button in the main VI to stop the SubVI thats still running (just like the stop button within labview (next to run and loop)) Can someone help me...
    thnx
    Bart bakels
    Are you saying that you want to use LabVIEW "Abort" button to stop a VI? If so, instead of using the LabVIEW "Abort" button you use a while loop controlled by a boolean button. then when the user presses the stop button execution of your top level VI will stop. Also, you can use a Global Variable to pass the value of the boolean button to your subvi. Then when the user clicks on the boolean button, the value change will be seen by the top level VI and subVI.
    You should not use the LabVIEW "Abort" button to stop execution of a program. The "Abort" button is intended to be used for development purposes.
    See the attached example and run "Global Variable-Top Level VI.vi"
    Chad
    Attachments:
    Global Variable-example.zip ‏26 KB

  • Abort Execution leaves USB port open

    My VI opens a USB port and then processes the data in a while loop for as long as I let it run.  When I manually exit the while loop the VI closes the USB port and then stops execution.  Using the start control starts the loop again and the VI runs.  However if I use the abort execution button on the toolbar the VI stops without closing the USB port and the VI will not run again unless I  close and reopen it.  How do I avoid this problem?
    Solved!
    Go to Solution.

    So I suggest always stop the program from the front panel button.
    You can hide the toolbar so that the the abort button can not be clicked.
    Best Regards
    Hu Yu

  • VI executable (.exe) without running, running continuously, abort execution and pause button

    Dear All,
    I want to make build an application (.exe) from a VI and I don´t want the front panel to show the running, running continuously, abort execution and pause buttons (VI Toolbar Buttons). The purpose is to make a SCADA application without the risk of accidental STOP.
    Maybe the question is too trivial but I am new to LabVIEW and I don´t find the way to do it (I unchecked the "Show Abort Button", from the VI properties menuo of the Build Specifications but nothing happens).
    Thank you very much
    Javier
    Solved!
    Go to Solution.

    Just hide the entire toolbar.
    LabVIEW Champion . Do more with less code and in less time .

  • I deleted Bonjour, since I don't need it for remote printing.  Now I get the message " Airport Base Station has stopped working: and also a message saying APAgent.exe can't be found.  What to do??? Thanks.

    I deleted Bonjour since I don't need it for remote printing.  Now on start-up I get the message: "Airport Base Station Agent has stopped working" and also message: "can't find APAgent.exe.:  Do I need AP Agent??  What to do??  Thanks. 

    The APAgent monitors your AirPort base station and informs you if there are things like firmware updates available. This utility relies on Bonjour, but is not required for base station operation. However, Bonjour makes it easier for your PC to "find" the base station via the AirPort Utility and I would recommend that you keep it installed. If you don't want the APAgent, you can just use the Apple Updater utility (that was also installed when the AirPort Utility was installed) to remove it.

  • TS4118 My calendar entries are not duplicated in either iCloud, or iPad - but are duplicated on my iPhone.  How do I stop this, and also how do I delete the duplicates???

    My calendar entries are not duplicated in either iCloud, or iPad - but are duplicated on my iPhone.  How do I stop this, and also how do I delete the duplicates???

    mervrich,
    Use the "Troubleshooting iOS devices" link in iCloud: Troubleshooting iCloud Calendar.

  • Ken Burns effects are unsmooth. They stop and start, also stutter as they zoom.  Can anyone advise?

    Ken Burns effects are unsmooth. They stop and start, also stutter as they zoom.  Can anyone advise?

    Are you noticing this while playing back a project you're working on in iMovie or are you notivinh it in finsihed projects (i.e. projects you output or Shared)?
    If the former, that could indicate something about your hardware configuration that's struggling to keep up with rendering your project on the fly while it's playing in iMovie.  Are you running other apps? Do you have limited hard drive space?
    What are the specs of your Mac?
    Matt

  • Stopping a SubVI without stopping the main VI

    Hi,
    I have a VI with two SubVIs which are being executed sequently, with the second SubVI waiting for an user event in the first SubVI. The SubVI front panels are open and used as the user interface when they are executed. When I push the stop button on the second SubVI's front panel, I do not want the whole VI to stop, but only that SubVI and execute the first SubVI once again.
    Does anyone have any idea how to achieve that?
    Thanks,
    LordSnow.

    P@Anand wrote:
    LordSnow wrote:
    Hi,
    I have a VI with two SubVIs which are being executed sequently, with the second SubVI waiting for an user event in the first SubVI. The SubVI front panels are open and used as the user interface when they are executed. When I push the stop button on the second SubVI's front panel, I do not want the whole VI to stop, but only that SubVI and execute the first SubVI once again.
    Does anyone have any idea how to achieve that?
    Thanks,
    LordSnow.
    I am bit confused of what you try to achive. How you are executing your sub vi's if you can attach your ode it would be easy to see what you are trying to do.
    Regretfully, I can't upload my code. Therefore, I will try to be more precise in my description. I open the main VI and execute it. This opens and executes the first SubVI, which waits for the user to interact with the front panel. Once this interaction has taken place, the second SubVI is executed which includes pretty much all the code there is. When I did everything I wanted to do in this second SubVI I push the previously mentioned stop button in order to stop that SubVI and that SubVI only, but right now all the VIs stop. My intention is to open the first SubVI again after I stopped the second SubVI.
    Does that help?

  • Can I put abort execution button and Run button in GUI ?

    Dear All ,
    Can I put "abort execution button" and "Run button" in GUI with bigger buttons ?
    Thanks.....

    Hi wMw.
                 Aborting normally works fine for very small applications or architectures but not for anything after that. Aborting a VI can leave things in states that you don't want to be in or references open. Sometimes you do need to Abort the code though (other programming environments use Abort buttons) so I don't think we can get rid of it entirely.But try to avoid it maximum.
    EDIT:why you are trying to do such a strange thing??
    Thanks as kudos only

  • When Creativ Colud is trying to install any programm the loading bar stops at 42% also if i am waiting some hours the loading bar remains at 42%

    When Creativ Colud is trying to install any program the loading bar stops at 42% also if i am waiting some hours the loading bar remains at 42%
    I tried to deinstall the creativ cloud and install it again but this doesn´t help.
    Can someone help me ? pls
    Sry for my bad english I am german. I hope you could understand me

    It could be that previous installs or your system is causing an error.  See if running the Adobe CC Cleaner Tool application on your system and running a fresh install fixes the issue.
    Start by restarting your computer, don't launch any applications, if applications automatically launch quit them all. This includes the Creative Cloud desktop application.
    To quit out of the Creative Cloud desktop application - refer to the following link: Creative Cloud for desktop FAQ
    You are now ready to run the CC Cleaner Tool – See the following page for information: Use the CC Cleaner Tool to solve installation problems | CC, CS3-CS6
    If that doesn't work let us know and also provide a bit of information about the system you are using. For example are you on a Mac or  PC, what operating system version (e.g. Windows 8.1, or OSX 10.10 etc). So we can review possible system related issues.

  • Plugin Container for Firefox has stopped working. Also Real Player says it needs update but when I try it says newest version is already insatlled.

    Constant crashes , Plugin Container for Firefox has stopped working. Also Real Player says it needs update but when I try it says newest version is already installed.

    Google Earth Plugin
    GEPlugin Outdated Version Update
    Plugin Icon
    RealPlayer Version Plugin
    6.0.12.69 Outdated Version
    Still saying I need updates but when I update it says I have current versions already.
    Also still keep getting plugin container for firefox has stopped working. But I'm not see a problem with anything.

  • Stop/ abort execution in case when the task inside while loop can not be completed

    I am using Count digital events example from LabVew. This VI is using DAQmx Read vi. If I press Stop button before this DAQ gets required amount of samples VI does not stop. I tried to change amount of samples on a fly with stop button but it did not work either.
    Please help.

    This is directly related to the way LV handle the data. Your question is similar to "How can I stop a For-Next loop before completion ?". The answer is : No way, except changing the loop for a while loop (ie: change the algorithm) or stop the whole vi.
    Attached is an example of stopping an infinite running loop. It uses a parallel loop, with a Stop node (see how to handle the stop button in order to reset it to false at the next vi run).
    If you only want to stop the DAQ, whithout halting everything else, the solution is trickier : you will have to run your DAQ loop in a dynamically loaded vi, then use the vi server functions to halt the vi if the run period is excessive. But that is worth another discussion...
    Give some feedback !..
    CC
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        
    Attachments:
    Stop_infinite_loop.vi.zip ‏9 KB

  • Abort execution

    I want to abort the execution of mapping, which running currently.
    Not thru killing oracle sessions
    Tried with @abort_exec_request.sql, but which takes for ever and job is still running.
    I have executed the map thru shell script job in unix (background). I have killed the unix jobs, stoped the OWB service.
    still its loading into target. In SQL i have locked the target table explicitly, even no use...
    Any one has any plan to stop the mapping.

    Greetings
    I share your pain. I have typically killed the UNIX process that is running the map via the Runtime User and also the UNIX process that is generated for the Target Schema owner as the map is trying to insert rows into a table.
    The database MUST rollback any operations it has performed to get all objects back to a stable state. I have had to wait many times for the database to rollback after I've killed the unix processes. I have even killed the database processes but they stay in a KILLED status while the database rolls back.
    We should be glad it does this to protect our data.
    I have not tried the abort_exec_request.sql function.
    Good luck.
    HTH
    -gary

  • Main vi stops when subvi appears

    Hello,
    In my main vi I have a lot of thing happening in it, one of them is giving signals to a USB relay device which I connected with DAQ Assistent.
    This relay is currently working on time pulses of 3 and 6 seconds. 3 off, and 6 on.
    It works fine when I use buttons or other things in my vi, but when I press a button to show graphs in a subvi the relay device stops working.
    The subvi with the graphs are now on my screen and only until I close that subvi, the relay starts working again.
    I changed the properties of the subvi:
    Window appearance - Dialog (instead of custom)
    Is there a way to make sure the relay keeps working, it's quite important...

    After looking into your code, i do not understand why you didnt split up the code initially into two loops. I marked the piece of code you can easily export. You just have to take care about passing the time-intervall between the loops. But this is easy.
    Easiest: If the delay does not change, just get it infront of both loops and pass it to them
    Simple: Use a locale variable. Just take care that ONLY ONE loops writes on this variable.
    Ellegant: Use a functional global variable (also known as LV-2-style variable).
    hope this helps,
    NorbertMessage Edited by Norbert B on 09-17-2007 04:53 AM
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.
    Attachments:
    SplitUp.PNG ‏16 KB

Maybe you are looking for

  • New hard drive...how do I get my songs back?

    My hard drive recently crashed and I had to get it replaced. Most of my songs weren't saved onto cd's (and I don't own an ipod), how do I get all those songs I bought back onto my system?

  • Commision Problem

    Hi, On cash sales we will give 1 % Commision to commission Agent. I am created a forwarding agent, & assigned incomplitionLog at the sales document header, so that during every cash sales transaction user will enter the respective Agent in the partne

  • Inserting images stored as BLOB in table to Oracle Report(10G)

    We have some oracle reports(rdf) built in Oracle 10g. Now we are planning to update these reports to include images stored as pdf's on file system. We have loaded these pdf's as blob into tables. Is there a way to include these image/s into the repor

  • GRC 10.1 HR trigger BEGDA

    Hello, everybody, I have faced a problem with HR-trigger: I need to delimit system in access requests that are created by HR trigger in GRC. I want to delimit valid from(for system) with BEGDA. BEGDA comes from 0302 IT with MASSN and IT. I checked lo

  • I5 photo shows on camera icon but not in photos icon

    i5 photo shows on camera icon but not in photos icon