How to exit event structure after a trigger occurs?

I am acquiring some analog signals. Before the trigger occurs, I would like to be able to save the setting or load the settings. I am using an event structure to do it.
My problem is I can't not exit the event structure after the analog acquisition is finished.
I am attaching the vi.
Thanks for your comment.
Attachments:
event.vi ‏53 KB

Seems you are trying to fire an event using a local variable. This will not work. Events are primarily designed to handle user interactions on the front panel. If you want to programmatically fire the stop event, you can write to a "val(sgnl)" property of the stop button.
Still, you program needs quite a bit more work than that. For example you cannot do any save or load operation before the trigger happens. Maybe you should redo the entire thing as a state machine?
LabVIEW Champion . Do more with less code and in less time .

Similar Messages

  • How does the event structure work & ...

    How does the event structure work & and how to modify the case example if you want to change the name of the case? I haven't a look at the manual but nothing about event structure is mentioned.

    I know how it works.. =P

  • How to use event structure of event data nodes event filter nodes in programming

    hi,
    I need manual of how to use 'event structure' events of 'event data nodes' and 'event data filters'...please help me....
    Regards
    Ravindranath

    I'm not really sure what you are looking for here.  Did you do a search in the LabVIEW help for Event Structure?
    The Event Data Node just returns information about the event, like control data, control reference, what caused the event, etc.
    The Event Data Filters are just used in Filter Events.  This allows you to discard an event or change the data that the event will recieve.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • How to exit from loop after 3  time

    hi
    how to exit from loop after 3  time
    loop at itab.
    <exit after 3 time>
    endloop.
    thanks

    Hi,
    You can check the value of SY_TABIX inside loop,
    For Example:
    Loop at itab.
    if sy-tabix  = 3.
    Exit.
    endif.
    Endloop.
    Hope it helps
    Regrds
    Mansi

  • How to handle event structures for two buttons and two counters.

         *I have two buttons A and B, and have to compare the difference in hits between them.  So do I place an event structure within a while loop for each button (2 buttons, 2 event structures, 2 while loops), or does it need to be one event structure with cases for both buttons whithin one while loop? 
         *How do I pass the values of buttons A and B's hit counters out of the while loop in order to calculate the differences between them after each increment, not just the final count after the stop button is hit? 
         *How would I make one stop button work to handle both buttons A and B?   I tried to place the actual stop button in one button A's structure and its global in B's structure, but It wont seem to let me use a local variable for a latchable control
    Checker

    You should probably have not started a new thread and waited until your question in the original thread was answered. You can modify altenbach's example for a second button. You have a single event structure with a new event for the second button. You have a second shift register to track the number of times the second button is pressed. Inside the while loop but outside the event structure, you just have a subtract function in or to report the difference. do not modify the posted example for the stop button. It works perfectly as is.

  • Re-triggering event structures after queue purged

    I have a vi built with an event structure that allows the user to stop the tests.  I am using the flush queue subvi in the producer loop to remove the remaining elements.  Then the user may fix the problem and again press start, starting the tests all over. 
    About 50% of the time, the event structure will not restart, and the vi will need to be stopped and re-started. 
    There must be something I am missing that is not allowing the event structure to re-start. 
    Is the position of the flush queue correct in my snippet?  
    What could cause the event structure to not respond and how can I troubleshoot it?
    Thanks.
    metzler CLAD
    Attachments:
    producer snippet.png ‏56 KB

    You should take more care about your error handling. Propably you just miss the errors that cause this behavior.
    * At the while loop, use shift-registers for the error wire.
    * I also recommend you to place a case around the event structure that catches errors and stop the loop.
    Felix
    www.aescusoft.de
    My latest community nugget on producer/consumer design
    My current blog: A journey through uml

  • Exiting event structures

    Hi,
    I need to select an exercise from a table (see attached).  Goto the front panel and select a row with a mouse click then hover over an exercise.   Can anyone suggest graceful way of exiting out of the event structure by hitting the enter key and passing the exercise you have selected to a string indicator?? 
    Thanks!
    Solved!
    Go to Solution.
    Attachments:
    Table of Contents2.vi ‏18 KB

    Newton2this wrote:
    I need to select an exercise from a table (see attached). 
    Unfortunately, you are using a multicolumn listbox, not a table. In order to select individual cells, you need to use a table control.
    Attached is a simple implementation, maybe it can give you some ideas. (I also assigned the enter key to the stop button).
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    Table of Contents3MOD.vi ‏16 KB

  • How to setup photo structure after switch from Windows?

    Hi Colleagues,
    Have changed all computers at home from Windows into Mac. As a result have new Air and Pro Retina plus NAS system by Qnap.
    WIth windows was having a regular photo file structure that was stored on NAS. This "library" has approximately 100GB and is manually structured in folders that represent events. So far was downloading pics to Win computer, making some adjustments, cleaning and only then moving them to NAS.
    Now what is the best practice to organize such files with Mac and iPhoto provided that I would like to have access to this database from both MAC's. How to go forward with current taken pics? Where to import them, store, etc?
    Look forward for your advices.
    Adam

    Picasa - you mean the google app and storage?
    Was using it for sharing pics, but it had limited space.
    There is a Picasa photo manager for the Mac - it is from Google but it is not th eonline version (although it integrates to that) - it is local to your mac - You will have to seperately research its abilities and if it will meed your needs
    NAS gave me same options so was not utilizing picasa for a long time.
    OK - but you can not use your NAS for their iPhoto library so people are suggesting alternatives
    Regarding file structure need to explore if I can change it on NAS.
    You can not - a NAS is not a disk drive - it is a headless computer and it has its own file system that can not be changed -
    You either need to change what you want to do and use iPhoto the way it works or change the software you use to a system that will work with your NAS
    Once again  You can not use either iPhoto nor Aperture with their libraries on a NAS
    You could use Aperture in a referenced mode with the original photos on the NAS and all of the edits, changes, etc on your mac
    You can use other programs - Picassa is a potential - and a Digital Asset Manager (DAM) discussion site will have others - there are soem that work fine with a NAS
    LN

  • How to exit batch file after launching java application

    hello, I have created a simple java application and a batch file to launch the application. but when execute the batch file the application execute but the batch file still
    appear. I want to launch the application and immediately close the batch file after the application appears.
    Best Regards,
    Boulebtina

    In the batch script use the "START" command to start the program. To use it you need to have the script browse to the application directory first as shown below:
    c:
    cd MyApplication\ApplicationFolder
    START myApp.exe
    exitThis will start an application that is stored in C:\MyApplication\ApplicationFolder\myApp.exe. I use this quite a bit and works well for me.

  • How to trigger the exit event of a subform?

    hi there,
    we added some code to the exit event of a subform to do some validation, but we found out that
    if the user save the form after filling it and without clicking somewhere outside the subform,
    the exit event will not be trigger, so the code will not check ,then the form got saved with errors.
    could you pls tell us how to solve this?
    br.
    zj

    Hi,
    Instead of writin code in Subform just write the code in exit of the individual field.
    thanks,
    Amish.

  • Boolean switch until released using an event structure

    I am using a boolean control with the mechanical action set to switch until released, I want the button to go back to the original state.
    I am using it in an event structure set to trigger on a value change. The action of pushing the button is generating two events, one of the on state and one for when it returns to the off state.
    How do I control this so that only one event is triggered and the second event that is queued up is ignored, I would like the button to go back to the original state and not execute code twice.
    Thanks
    Jim
    Solved!
    Go to Solution.

    You can use the value from OldVal or NewVal in the event case and a conditional structure to mask it off.  Do you really need switch until released functionality?  That's intended to give you two events, as the click and release are different actions.  Switch when released might be a better fit for you if you only want one event.
    --Using LV8.2, 8.6, 2009, 2012--

  • Questions from a rookie about event structures

    Hello,
       I am currently scheduled for Labview classes next month,
    so I want to apologize in advance for "dumb questions". I have created
    a program that is starting
    to be a CPU resource hog. The majority of my program is inside a while
    loop so that the program will "react" to changes in controls, etc. I am
    assuming that
    if I incorporate "event structures" in my program that my program will
    not be a resource hog.  Is the use of event structures the correct
    way to go? If using
    event structures is the correct way to go, what is the best way to
    learn how to incorporate "event structures"?  I am assuming that
    the examples in Labview will show me how. Are there any good reading
    materials about event structures?
    Regards,
    Kaspar

    To fix the CPU resource issue, you need to place a small wait statement in your loop. It will solve two problems:
    Slow down the loop (you don't need to check for UI changes more that 10x/second)
    It will allow other, parallel tasks a chance to run after each iteration. Without a wait, it will hog the CPU for 55ms before releasing control.
    If your loop currently spins one million times a second and you would place a 1ms wait, the CPU would go from 100% to 0.1%!
    The event structure is a fantastic tool to solve most UI issues and it makes the diagram automatically simpler, more self-documenting and easier to read. Have a look at some of the examples that ship with LabVIEW.
    The event structure is easy to learn, so dive right in. Read the online help for some important considerations. As a rule of thumb you should stick to a single event structure per diagram.
    LabVIEW Champion . Do more with less code and in less time .

  • Event structure problem in updating array

    Hi, i have a problem with my .vi...
    i have an array of 10 boolean i want to modify by pressing SET TRUE or SET FALSE buttons, after selecting (with the ring selector) which is the elemente that should be changed...
    there seems to be something strange in the behaviour... the array is not correctly updated... maybe there a big mistake i cannot find...
    i  hope you could help me
    tks
    Attachments:
    array_modify.vi ‏18 KB

    The problem is the the Ring control is read before the event structure, so it return "old" data when you click of either SET TRUE or SET FALSE.
    You need to move it so that it is read inside the event structure after you click on one of the "SET" buttons.
    Create a local of the Ring for one of the SET events and move the Ring terminal into the other.
    Or create a blank event for the Ring control so that it will update the input tunnel going into the event structure.
    Or create a single event to handle both SET TRUE and SET FALSE.
    Omar
    Attachments:
    array_modify.vi ‏9 KB

  • How to trigger value change in event structure

    Hii everyone, as the title, how should I trigger the value change event to pop up a message.. below is my connection..
    I want to trigger the event structure to pop up the sub-vi, when the flame and led are TRUE state... I using property node but still the event structure not able to execute.. How should I connect? Thank you very much...
    Solved!
    Go to Solution.

    There are several ways you can do it. First you have to configure your sub-vi so that it does whatever you want when it runs  (in the vi properties, top most window for example) and to make sure that it closes completely when finished (when clicking the "OK" button for example).
    You than need to make an asynchronous call to the sub-vi. There are several ways to do it. My favorite one is shown below. You go in the "Application control" sub-palette and select Static VI reference. I like this approach because it keeps track of the sub-vi path for you, as long as the sub-vi is in the same project. You then drag the sub-vi onto the empty square that will changes to your sub-vi icon. You then connect to an invoke node from the same sub-palette and select run VI. Set "Wait Until Done" to false and the main VI will keep running after starting the Sub vi. Set "Auto Dispose Ref" is the easiest way to go. Otherwise you have to keep track of the sub-vi reference and close it yourself when you're done.
    Marc Dubois
    HaroTek LLC
    www.harotek.com

  • How do i get a boolean indicator to trigger a event structure

    I have two parallel loops running, and i need to use a boolean value, one that comes out from an OR gate, to trigger an event in the parallel, event structure loop.  I've attached a simplified version of the loop.  Is there a way to get this done?  I've tried using local variables, value(signaling), etc. and they haven't worked
    Solved!
    Go to Solution.
    Attachments:
    Parallel Loop Trigger.vi ‏10 KB

    Here is a revised version of your VI. I modified the mechanical actino of the stop button so it kept it's value until it was read. In addition, I added a delay to your upper loop. Without a delay it was running too fast to actually see the button press. I modifed the event in the the event structure to trigger on a value change of Boolean.
    You don't really need the outer loop since it will only run a single time in all instances. On the first execution of that loop it will be sitting in the turn inner loops. Once you exit the two inner loops your outer loop will always exit. Therefore, it serves no purpose.
    Your OR in the upper loop is completely uses. It serves no purpose since the result will always be equal to the value of the Stop button.
    There are better ways of triggering events. a preferred method would be to use a user event and simply generate the event at the appropriate time. This has the advantage of not requiring additional controls/indicators simply to cause an event to occur.
    Mark Yedinak
    "Does anyone know where the love of God goes when the waves turn the minutes to hours?"
    Wreck of the Edmund Fitzgerald - Gordon Lightfoot
    Attachments:
    Parallel Loop Trigger.vi ‏12 KB

Maybe you are looking for

  • Authority check at field level in sales order

    Dear all, our business requirement is the following: only some users should be able to see the prices (including netwr, netpr,...) in the sales order depending on the authority check performed on the sales group field. This means that for an order of

  • Motorola Input Disappeared

    I downloaded ICS earlier this week on to my Droid 4.  The "Select Keyboard" notification kept popping up and it was annoying me, so I looked around on line to see if there was a way to make it stop.  Someone suggested disabling the "Motorola Input" a

  • How do you create a program in Labview that can be run as a Windows Service?

    I would like to create a Labview program that can be run as a Windows service.  I have read the following Knowlegebase articles and have done what they say.  Creating a Windows NT Service Using LabVIEW http://www.ni.com/white-paper/3185/en  Running a

  • Reader 11 very very slow

    Hi Ever since updating to Reader 11 I have found Reader CRIPPLINGLY slow. PDF's will open, then freeze, then give 'not responding' and somtimes crash. If I am lucky, when I shut everything else down, it might cooperate if I am patient. What's going o

  • I am not able to import a audio CD the import window does not show up

    I am trying to import a music CD but the import window does not show up and the cd does not copy into itunes.