How to take action when vi stops running

Sorry for the newbie question but I can't seem to find the answer anywhere. How do I go about taking action such as turning off leds or reseting some variables when my vi stops running. Is there some sort of boolean flag that I can read to determine if the vi is running or a flag that gets set when the vi terminates? Thanks in advance.
Solved!
Go to Solution.

The state of the LEDs should not be important if the VI is not running (edit mode), it is however probably important that they are off next time you run the VI.
To make sure that indicators start out at the desired defaults when the VI starts running, go to "VI properties...Execution" and enable "clear indicators when called".
LabVIEW Champion . Do more with less code and in less time .

Similar Messages

  • How to stop SAP B1 when i stop running my application?

    HI Friends,
    I am adding a menu item in SAP B1 using the addon. SAP B1 is having the new menu added, even though i stopped running my application. I need to remove the menu added when i stop running my addon application.
    In which event i can do this?
    Can anyone help me pls...
    Thanks,
    Siri

    You can use  the SBO_Application.Menus.RemoveEx method indicating your Menu ID.
    Private Sub SBO_Application_AppEvent(ByVal EventType As SAPbouiCOM.BoAppEventTypes) Handles SBO_Application.AppEvent
            Try
                If EventType = SAPbouiCOM.BoAppEventTypes.aet_LanguageChanged Then
                    CreateMenuAddOn()
                Else
                    Try
                        SBO_Application.Menus.RemoveEx(MyMenuUniqueID)
                    Catch ex As Exception
                    End Try
                    System.Windows.Forms.Application.Exit()                
                    End
                End If
            Catch ex As Exception
            End Try
        End Sub

  • How do I get my applicatio​n to go away when it stops running?

    Hi.
    So, I've build and application, and when I programmatically exit from my program, it stops running as expected, but the main top-level panel is still there, allowing me to run it again by pressing the run arrow.  I want double-clicking the executable icon to be the only way the user can run the program.
    Is there anyway of doing this?
    Thanks...
    -Umar.

    Have you tried the 'Quit LabView' .vi?  LV 8.2.1 example attached.
    I usually test for the application kind, so that the development system doesn't exit but the built application does.
    Matt
    Attachments:
    quit_application.vi ‏9 KB

  • AIS CC: how undoing the actions of a JS run via app.doScript

    Hello,
    AIS CC (9.0)
    I wrote a JavaScript, which I can properly run through app.doScript(UndoModes.fastEntireScript, etc.).
    Now, at a given time, I would like to programmatically undo the actions of my own script.
    The various resources I have got here (InDesign_ScriptingGuide_JS (CS6), InDesign_ScriptingTutorial, the ExtendScript Toolkit Object Model browser) suggest things (app.undo(), app.documents.item(0).undo(), etc.) which fail, when executed on my AIS CC.
    Any idea or tip, on how to undo actions submitted via doScript on AIS CC?
    Thanks in advance!
    Kind regards,
    GB
    Snippet:
    var main = function()
         // something
    app.doScript(
         main,
         ScriptLanguage.javascript,
         undefined,
         UndoModes.fastEntireScript
         ); // << this works perfectly: the actions in the "main" function are executed
    app.undo(); // << this will fail with "app.undo is not a function"

    Thanks for your fast reply.
    you're undoing the entire script, which is probably not what you want.
    Undoing everything embedded in my "main" function is really what I want to achieve.
    Whether it's a bunch of complex code, or nothing at all (as in my snippet, where "main" contains only a comment line ), it's what I want.
    the recommendation is to us entireScript
    I changed my "UndoModes.fastEntireScript" into "UndoModes.entireScript", as you suggested; with no avail so far: I still get the same "is not a function" error.
    Actually, I have the feeling that I do not understand/master the InDesign DOM here, and am simply trying to make a call to a method (undo) which does not exist in this class (app) - despite the Adobe Reference Manual says it does...
    It sounds an inefficient way to write a script
    My script makes some changes in an InDesign document ("main" function), then exports it to PDF (out of the "main" function).
    Then, the environment I work with (XMPie) will inject variable information in the InDesign document for the next recipient.
    At this time, I need the document to be reset to its original design.
    That's why I need to undo all the changes applied by the "main" function.

  • How to perform action when clicking button of NSAlertSHEET

    How can I perform an action when people click on "Update"?
    NSAlert *alertSheet = [NSAlert alertWithMessageText:@"New update available"defaultButton:@"Update"alternateButton:@"Remenind me later" otherButton:nil informativeTextWithFormat:@"There is a new update available."];
        [alertSheet beginSheetModalForWindow:self.window modalDelegate:nil didEndSelector:nil contextInfo:nil];
    I tried this:
    (but this doesn't work)
    NSAlert *alertSheet = [NSAlert alertWithMessageText:@"New update available"defaultButton:@"Update"alternateButton:@"Remenind me later" otherButton:nil informativeTextWithFormat:@"There is a new update available."];
        [alertSheet beginSheetModalForWindow:self.window modalDelegate:nil didEndSelector:nil contextInfo:nil];
    if ([alertSheet runModal] == NSAlertFirstButtonReturn){

    Your first step is wrong.
    yourInternalFrame.addInternalFrameListener(
         new InternalFrameAdapter(){
      public void internalFrameClosing(InternalFrameEvent e){
        // do part
    });

  • How to find out when dcpromo was run on a server?

    Is there an event ID or something that gets logged that shows when dcpromo was run on a server? I am trying to figure out when a server was promoted to a domain controller.
    Thanks

    multiple ways to find out when DCPROMO was executed......
    * Check the DCPROMO.LOG in C:\Windows\Debug
    * Check the creation dates of the folder for the NTDS.DIT file and the SYSVOL
    * Check the creation of the computer account, the NTDS Settings object (all in AD)
    this should give you an idea of when DCPROMO was executed
    Cheers,
    (HOPEFULLY THIS INFORMATION HELPS YOU!)
    Jorge de Almeida Pinto | MVP Identity & Access - Directory Services
    * This posting is provided "AS IS" with no warranties and confers no rights!
    * Always evaluate/test yourself before using/implementing this!
    * DISCLAIMER: http://jorgequestforknowledge.wordpress.com/disclaimer/
    ################# Jorge's Quest For Knowledge ###############
    ###### BLOG URL: http://JorgeQuestForKnowledge.wordpress.com/ #####
    #### RSS Feed URL: http://jorgequestforknowledge.wordpress.com/feed/ ####
    -------------------------------------------------------------------------------------------------------<>
    "K_evin Zhu" wrote in message news:[email protected]...
    Hi,
    As this thread has been quiet for a while, we will mark it as �??Answered�?? as the information provided should be helpful. If you need further help, please feel free to reply this post directly so we will be notified to follow it up. You can also choose to
    unmark the answer as you wish.
    BTW, we�??d love to hear your feedback about the solution. By sharing your experience you can help other community members facing similar problems. Thanks for your understanding and efforts.
    Best Regards
    Kevin
    Jorge de Almeida Pinto [MVP-DS] | Principal Consultant | BLOG: http://jorgequestforknowledge.wordpress.com/

  • How to perform action when the close button is pressed?

    i am using a JInternalFrame and i would like to perform some actions before the internal frame closes when i press the close button on the top right corner of the frame.
    i know the first step is:
    setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);
    what next? what actionlistener shd i use??
    thx very much

    Your first step is wrong.
    yourInternalFrame.addInternalFrameListener(
         new InternalFrameAdapter(){
      public void internalFrameClosing(InternalFrameEvent e){
        // do part
    });

  • How can I 'onclick' when animation stops?

    Hello I have an animation (EDGECC 2014.1.1) which I sadly I can't attach.
    The countries move into place. Once there I want to be able to click on the country which will 'jump' to another animation (maybe zoom the country) or just open a new website in a new window.
    The problem i'm seeing is thus:
    1 The ability to click is present through the whole transition (I want it just at the end - when the countries are in place)
    2. The click doesn't work at the end of the transition 'STOP'
    Can anyone help please?
    Regards - Paul
    On the image below Ihave removed the 'stop' trigger at the end of the intro (introstop). If I  include it then I can't click to jump to the next bit called UKMAP (In this instance it just makes the map bigger)

    Here is a sample:
    https://app.box.com/s/h1w9663aa4h6g34elzslefdlvc9zspem
    Important: You need to load jquery to use each() but if you want I can also post a version without jquery.
    I placed this code at the end of the timeline. This way the event if available only when the animation is finished.
    var buttons = sym.$("buttons").children();   
    var urls = ['http://www.adobe.com','http://www.google.com','http://www.apple.com','http://www.twitter.c om','http://www.facebook.com']
    $.each(buttons,function(i){
      $(this).on("click", function(){
      window.open(urls[i], "_blank");

  • How do I drop all outputs out/off when my vi stops running?

    Hello,
    I noticed when I stopped running my vi (targetted to RT) from my host computer that my program in the FP2020 continues to run, ie. all outputs that were on stay on. I'm used to the PLC world which stops all outputs  when program is stopped. Is there a way to accomplish this with my FP2020 I/O?
    Regards,
    John

    John,
    There is a feature that solves this exact issue. It is called a Network Watchdog, and you can configure it in Measurement & Automation Explorer. You can set this up to set your outputs to chosen values whenever you lose network connection for a specified amount of time.
    There is a tutorial on configuring the FieldPoint Watchdog at http://zone.ni.com/devzone/conceptd.nsf/webmain/fb7aabacc2bab99686256c7e0080e60a
    You have to enable the network watchdog for the FieldPoint bank, then enable the watchdog for the modules you want and specify values for each channel.
    Michael P
    National Instruments

  • Take action on sucessful execution of a job

    Hi,
    I want to create a scheduled job, during each execution of this job, I wanted to take action on "successful completion", how do I do that?
    Thanks

    I meant is there a way to configure the job as multistep or something where if the first step completes, I execute the second step.
    For example, I could create the job and use "errorAction" to take action when the job errors out, is there something similar with successful completion?

  • When I'm running Firefox 4, I can't run Adobe Photoshop (message reads "attempt to access invalid address" - what can I do?

    When I'm running Firefox 4, I can't run Adobe Photoshop Elements 5.0 at the same time. I get an error message which reads "attempt to access invalid address". When I stop running Firefox, I can use Photoshop again. What can I do?

    Which OS are you using? Because there have been some issue with Win7 and PSE4. Try upgrading to PSE8.You can try the trial version of PSE8.

  • How can I get my apple remote to stop running my Mac when I am trying to use airplay?

    How can I get my apple remote to stop running my Mac when I am trying to use airplay?

    http://support.apple.com/kb/PH14076

  • When I click the home button, it takes me to my home page AND opens a blank tab. How can I get it to stop opening the new tab!

    I have igoogle as my hompage. When I click the home button, it will open my igoogle page but also open up a blank tab as well. Firefox didn't always do this, it just started. Maybe when I upgraded to the 5.0. I've tried looking in the options and I can't find something there and there doesn't seem to be a solution on the web. How do I get it to stop doing that?

    Troubleshooting extensions and themes
    * https://support.mozilla.com/en-US/kb/Troubleshooting%20extensions%20and%20themes
    Restore the default home page
    * https://support.mozilla.com/en-US/kb/How%20to%20set%20the%20home%20page#w_restore-the-default-home-page
    Check and tell if its working.

  • Firefox does not load the first time I click on it -- a script appears which ischrome://webvideodownloader/content/utils.js:131 -- when I stop this script running I can then load firefox -- how can I keep this script from running

    I can still load it with the script running or attempting to run in the background but it makes firefox tremendously slow. After I click on stop running the script then everything seems to be ok.
    how do I get the script not to run in the first place.

    In Firefox the use of the term chrome refers to the user interface and other elements that are not part of the web pages.
    See https://developer.mozilla.org/en/Chrome
    Your problems seems to be caused by the GreaseMonkey extension.<br />
    See [[Troubleshooting extensions and themes]]

  • Using the warp tool I'm stabilizing  my video and getting rid of the edge artifacts. Analyizing is clear on how long the process will take, but when it stabilizes I only get three moving dots. I there a way to know when the process will stop? Thanks.

    I am using the warp tool to stabilize my video and get rid of the edge artifacts.  The program is very clear about how long it will take to analyze, but there is nothing about how long the stabilization will take nor when I know when it is complete.   Thanks ahead of time.

    Warp Stabilising is a two part process.
    Analysis and Stabilising.
    Both have a banner across the Program Monitor during the process ( unless you have turned that off.
    Analysis start automatically on forst application...but you can rock in there and start adjusting the parameters.
    You may need to hit "Analyse" Button again.
    You should see the number of frames and the estimated duration during this process.

Maybe you are looking for

  • How to develop a report with current price &  the last price in the pre.yrs

    hi , guys, my client want a report to list of material with respective vendor and to make a price comparison betn the current price & the last price in the privious year. can any one help how to develop the report, shall go for generic extrc. thanks

  • ARCHIVING Object COPAC_****

    Hi All, As we don't have any read program for the Archiving Object COPAC_**** and also we don't have any Info Structure available for this object. Is there any other option available to Verify the data which got archived through this Archiving Object

  • How to write a (g)zip file to disk using NIO

    Hi, I want to write some data to a zipped file. I have all data to write to disk in ByteBuffer objects so I want to use NIO. The GZIPOutputstream does not have a getChannel() method. So what is the best method to zip data to file? Any comments are we

  • Init / Nav Flag in Technical Content Query 0TCT_MCA1_Q0142

    Hi Experts, In the technical content query 0TCT_MCA1_Q0142, there is a field Init / Nav Flag. I am not able to figure out the meaning of X and #, what does 'X' and '#' stand for, my understanding is that Init / Nav = '#' signify that it is a initiali

  • Prevent past date entry on the delivery date field

    Hi Guys, I was wondering whether it is possible within standard SAP Business one 8.8 to prevent users from entering past date in the delivery date field on the Sales order screen.   I have people making mistakes by entering 10/10/2010 instead of 10/1