Locked panel using event structure

Hi!
I'm using an event structure block to run a sequence only when a value of a control has changed.....when I edit this event I set the option NOT to lock the front panel.
When I run the vi's I can change the controls of the front panel......but all the code outside of the event structure block does'nt run....what i have to do?
I've attached a simple example.....boolean2 can change his value but the code is not executed
Thanks in advance
Larson
Attachments:
example_event_error.vi ‏42 KB

hi there
the while-loop waits for all the code contained in it to finish until it turns again. the event-structure has no time-out case defined, so if "Boolean" dosn't change it waits eternally. that's why the "Boolean 2" seems to be locked, because this code is not executed any more until the next turn of the while loop.
add a timeout-event (event source = Application) and connect the event timeout (e.g. 100 ms). be aware that the reaction to a change of "Boolean 2" takes up to timeout ms. another option is to put the code inside the timeout-case.
best regards
chris
Best regards
chris
CL(A)Dly bending G-Force with LabVIEW
famous last words: "oh my god, it is full of stars!"

Similar Messages

  • Unexpected effect of Lock Front Panel in Event Structure

    I have been using LV intensely for only a short time, although I have dabbled with it many times since its first appearance. The "problem" that I have had may well be the intended behaviour, but it just seems unintuitive to me. I'm writing a small application to take measurements from a USB instrument. I have already written a basic driver for the instrument, which the application calls, and the driver is working as expected. In the application, the user can configure various settings and then click an Execute button to transfer them to the instrument. The click event is handled in an event structure along with other events. Since some of the instrument operations take an appreciable time, the first action that occurs in the click event case is to disable the Execute button using a property node so that further clicks are ignored until the operation completes, at which time the button is re-enabled.
    When disabled, the Execute button is grayed out as expected and clicking it has no visual effect. However, it seems that clicks made during the disabled period are still queued and acted upon when the button is re-enabled, causing the operation to be repeated.
    It is the solution I have found that seems unintuitive to me. The Lock Front Panel check box was checked (by default) for the click event, and I assumed that this would be the correct setting. However, unchecking the Lock check box actually makes everything worked as expected. Click events occurring during the disabled period are now ignored or discarded. I'm not suggesting that this is a bug, but I'm interested to learn why it happens, if anyone can explain. I have attached a picture of a simplified version of the event case.
    Attachments:
    Sample.png ‏7 KB

    I would say what you see is expected behavior, even though it's a bit complicated.
    The "Lock front panel until the event case for this event completes" option will only defer clicks and other things generating events until the current event handler completes. So this means that the click is placed in a queue and only evaluated once the event is finished. At this time, the button is no longer disabled, so an event is generated.
    When the "Lock front panel until the event case for this event completes" is not checked, the click is immediately evaluated, but it's happening on a disabled control, so it does not generate an event.
    From the LV help:
    By default, when an event enters a queue, LabVIEW locks the front panel that contains the object that generated that event. LabVIEW keeps the front panel locked until all Event structures finish handling the event. While the front panel is locked, LabVIEW does not process front panel activity but places those interactions in a buffer and handles them when the front panel is unlocked.
    Note If an event case that locks the front panel takes a significant amount of time to execute, consider using the Set Busy function or displaying a dialog box to notify the user that the front panel is locked.

  • Exit from the application using event structures

    Hi
    In my project i used event structure it working fine.
    Now i want to exit(close) the application when i press EXIT button on the front panel.
    Here i attached my project give an idea.
    Regards
    hari
    Solved!
    Go to Solution.
    Attachments:
    Sledge.zip ‏40 KB

    Hi SAM
    U saw my ok.i have one more problem when i run the program(main vi) all the remain sub vi's also opened.
    i want open sub vi when i press a button on front panel.
    i have made small changes to it.
    Regards
    hari 
    Attachments:
    Sledge.zip ‏41 KB

  • How to run the two events at the same time by using event structure

    In my project, I have to run two stepper motor which can run both forward and reverse direction by changing the control in front panel so I am using event structure. In front panel I gave two separate controls for both stepper motor such as forward,reverse and stop. I would like to do motor1 will rotate alone, motor2 will rotate alone and both motor will rotate at the same time when user click the control in front panel. My doubt is how to run a motor2 while motor1 is running at the same time please tell me the suggestion for this problem
    Attachments:
    motor.png ‏192 KB

    How do you control your motors?
    Most motion control systems do supply two modes:
    a) position based motion: The motion axis has a positioning system (most often some kind of encoder system) which enables the motion control to know where the axis is currently located. Passing the target location to the controller will result in the axis to move to that location. This is, for most applications, the recommended approach. It does require some sort of motion controller device.
    b) direction based motion: This essentially tells the periphery device for the motor to move at a certain speed into a certain direction. As it does not stop at a dedicated location, it induces great risks for many applications if there are no kill- and/or end-switches. Depending on the setup, this can be either done with motion controllers or pure by software control (e.g. "controlling" the voltage level for the motor).
    If you go for a), there is not much preventing parallelism as you request.
    Option b) depends on the setup. If you have a control loop in the software itself, you have to move to an architecture like the producer/consumer. Please note that this does not incorporate any security measures for the external devices.
    hope this helps,
    Norbert
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • Can I use Event structures in a subVI?

    Hi,
    I have a subVI (ProvaEv1.vi) that use an event structure inside. But when I use it in a VI (ProvaVI.vi) the event structure in the subVI doesn't catch the events.
    I tried to insert the event structure in a while loop but it doesn't work too.
    Could you help me?
    Thanks Ius
    Attachments:
    ProvaVI.vi ‏11 KB
    ProvaEv1.vi ‏15 KB

    "iusn" <[email protected]> wrote in message news:[email protected]...
    Thanks to all for your answers!
    Wiebe! I tried to do as you suggested but I am not able to link the Event Reference Number inside te SubVI with the Event Register Number of the Register for Event in Main VI. There is e class conflict. Another question: how the SubVI can know the structure of the Register event outside?My aim was to create a modular structure but it seems very difficult, wath do you think about these problems?
    The broken wire is related to your question. The event structure inside the sub vi knows about the events you register in the main, because the reference wire/control has a "strong" type. It contains information about the registered events. That is also why the wire is broken. You have to register all events, then create an indicator/control of the output. Use that control in the subvi. You have to do this every time the events change (you might use a type def if you use the control a lot).
    Usually, the events that you would want to put inside subvi's are those related to user interface objects. I've had this a lot. You make a nice interface, but it's not reuseable, because the events are mixed with all the other events. Only solotion is to manually add the needed event cases in your program, and copy the code.
    Even if you can put the events in a sub vi, I'd expect hanging vi's when more subvi's are registered for the same event. It's hard to tell without trying. So it's not a real solution either.
    Like Chrisger suggested, the event callback might help a little, but they are tricky, and actually ment for this (they are intended for activex callbacks).
    Perhaps you should look at XControls (if you use 8.2). It would be more work to replace your code to XControls, but once you're done, you have reusable code.. Haven't worked with them jet, but they are invented for this problem...
    Regards,
    Wiebe.
    I have already create my application using event structure just in Main VI but it seems very complicate to read and keep update, I would have wanted to give modularity to my application.
    Thanks Ius
    SubVIEventMain.vi:
    http://forums.ni.com/attachments/ni/170/203225/1/SubVIEventMain.vi
    SubVIEvent.vi:
    http://forums.ni.com/attachments/ni/170/203225/2/SubVIEvent.vi

  • Problems using event structure to write new parameter values to VISA

    Attachments:
    FMA_event_2.vi ‏28 KB
    FMA_event_2.vi ‏28 KB

    It seems I'm also having trouble using forums..not sure what happened...updated and corrected thread: http://forums.ni.com/t5/LabVIEW/Problems-using-event-structure-to-write-new-parameter-values-to/td-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

  • Stop graph using event structure

    How could I stop the wavform chart during running the loop using event structure?

    duplicate post
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • How to control the tab control using event structure?

    Hi,
    I am using tab control and event structure in the program.
    When i run the application event is not happening for the active page.
    When user switches from active page to the other page then event is taking place for all pages
    So, how to get the event trigger for the active page when the application is started
    For more clarification i am attaching the code "Test Control Tab using Event Structure.vi"
    Attachments:
    Test Control Tab using Event Structure.vi ‏52 KB

    You have a basic misunderstanding of dataflow. Maybe you should start with some tutorials or study some of the examples that ship with LabVIEW.
    The event structure belongs inside the while loop, and not vice versa. RIght now, the event structure only runs exactly once and never again.
    If the stop is pressed first, the VI will stop. Game over.
    If the tab control is changed (from any state to any other state!), the inner loop will spin forever as fast as the CPU allows, either executing one or the other case. It just reads the tab terminal to decide which case to execute. Changing tab never triggers any events. The VI is trapped inside the event until stop is pressed to stop the VI.
    you were closer to a reasonable program in the other thread:
    http://forums.ni.com/ni/board/message?board.id=170&view=by_date_ascending&message.id=287905
    Have you tried execution highlighting? Maybe things would become more clear of you do.
    LabVIEW Champion . Do more with less code and in less time .

  • Labview 2013 cannot use event structure

    Event structure can be added into the back panel, however when i add event case or try to edit the default event case, the program is crask and cannot response to my mouse. 
    when i launch windows task manager, it present " running" properly.
    However this program run properly at my another computer with sample Win7 OS.
    Can anyone tell me what the problem is?

    Aaron1978 wrote:
    sir, this issue does not related to code, even i create new empty VI, the event structure cannot work properly, i cannot add new event or edit the default even!
    However, i installed the same eval version into my another computer, this event structure can work properly, both computers use same Win 7 OS.
    Okay in that case I would recommend a repair install of LabVIEW.  
    Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
    If 10 out of 10 experts in any field say something is bad, you should probably take their opinion seriously.

  • Using Event Structures with Array of Clusters

    Using LabVIEW 8.5
    Hi all,
    I'm trying to convert an existing application to one that can be used
    through a touch screen. I updated the UI and added an event structure
    to listen for mouse ups on controls that require a HMI keyboard or
    numpad to show up. Although I've been programming for a while, I'm new
    to LabVIEW and am struggling with a problem:
    Is there any way to have an event case listen to an event within
    arrays? I've seen a few examples on the forums, but they all start with
    breaking up the arrays into individual variables. Using the variables,
    they build arrays. This seems pretty tedious, and I'm pretty sure I
    can't apply it to one of my arrays. Essentially, I just want to know
    which cluster in which array the user has clicked on, so I can open the
    HMI keyboard or numpad and send the text to that cluster. In my watered down app (Array of Clusters.vi), I've put 3 arrays of clusters and a few stand-alone controls to give you guys an idea of what I'm taking about.
    BTW, I'm using the HMI Keyboard and Numpad built by the Beta Community (http://decibel.ni.com/content/docs/DOC-1062) and modified it to add a "Clear" button to the keyboard and numpad. Please let me know if I implemented this in the best way.
    Thanks for the help,
    Kunal
    Message Edited by bhatiak on 08-04-2008 03:55 PM
    Attachments:
    Array of Clusters4.llb ‏274 KB

    My old tic tac toe example shows how to determine which square of a 2D array has been clicked.
    http://forums.ni.com/ni/board/message?board.id=170&view=by_date_ascending&message.id=247044#M247044
    You probably can adapt some of it for the arrays on the right. If the array can be scrolled, you also need to account for the "indexvals" offset.
    The Layers controls is easiest, because you only show one element. Just read the "index vals" property to get the array element and parse the coordinates to get the cluster element.
    btw: the small while loop on the right serves no purpose at all and acts just as a CPU burner. You can delete it without any change in functionality. Is there anything else to it?
    LabVIEW Champion . Do more with less code and in less time .

  • Problems with event source using event structure

    Hello!
    I'm using an event structure block. It works correctly when the event source is a control and the event is change value. But i want to use an indicator like event structure or a variable (like a matrix or a vector). I want that when the value changes, an event occurs, but it doen't work, I dont' know why?. What i have to do to work with indicators or variables in a event structure block?
    Thank you in advance
    Larson

    of course!
    regards timo
    Attachments:
    change_detection.vi ‏20 KB

  • Firing events from a Menu using Event Structure - all in the same Event Window?

    I have an ap where I have three menus, and several selections from
    those three menus. I'm trying to keep everything within the Event
    Structure, but it seems that ALL of the events fired from the Menu must
    be contained within one "frame" of the Event Structure, that being the
    Menu Selection (user) Event. In other words, if I have 16 events that
    can be fired from the menu, do I have to put them ALL in this one event
    frame?
    I can't seem to use a T/F indicator within the Menu Selection (user)
    Event to access another Event. For example, within the Menu Selection
    (user) Event, I placed a boolean named X and can turn it on with a menu
    selection. Now, make a new Event Structure to look for X Value Change -
    doesn't work.
    Message Edited by Broken Arrow on 11-30-2005 10:24 AM
    Richard

    I use one event, Menu Selection (user). to trap all of my menu events.  Use Item Path and / or Item Tag to figure out what menu item was selected then branch code based on selection.  Wtih Booleans and menus you need to update the state of the boolean on the menu by setting it True or False.  It doesn't automatically toggle like you would expect.
    Matt
    Matthew Fitzsimons
    Certified LabVIEW Architect
    LabVIEW 6.1 ... 2013, LVOOP, GOOP, TestStand, DAQ, and Vison
    Attachments:
    menuSelect.JPG ‏45 KB

  • Use event structure and while loop in parallel

    Hello, I would like to use an event structure in parallel with a while loop. I have a camera that needs to constantly take pictures and I have that setup in the while loop. I also however need to do other functions in conjunction with the picture taking. I have about 50 or so events that need to have access to while the pictures are taken. Is there any way to do this? If not is there any way to have a global stop variable that is attached to all 50 of the events. I know I can do this the hard way and have each boolean event in the event structure be attached to the while loop stop control. This is however very inefficient. I would also like to know if I can simply use a mouse click as the stop of the while loop. Am I able to have a variable that goes from false to true on mouse click without using the event structure to do this? Thanks.

    Yes, just place the event structure in a second while loop.
    Add a stop button to the other while loop and add an event for the stop button to stop both loops. For a simple example, see my VI posted here:
    http://forums.ni.com/ni/board/message?board.id=170&message.id=176367&jump=true
    Simply add more event cases as needed.
    LabVIEW Champion . Do more with less code and in less time .

  • Buttons stay pressed when using event structure

    I have an event structure in a while loop to handle various buttons the user can press.  I used this instead of case structures on the buttons because I have some advanced events I want to happen to the controls as well.  Code wise it is working fine, but the buttons are not release when you press them.  They only change once when pressed.  So if they are released and you click them they stay pressed.  If you click on them again, they release.  This is very ugly.  What am I doing wrong?  I have tried changing thier type to switched vs latched and it makes no difference.  I tried changing the event on them as well and that doesn't seem to matter.  Currently I have "mouse released" on the button as the event trigger.

    Hello Muffin,
    If you have the buttons configured for "latch" operation (reset after being read, which sounds like what you want), the button will only reset when it is actually read within the code- are they connected to anything or read somewhere within your application?  The simplest way to ensure the buttons are read when the event is triggered is to place them within the mouse-up event.
    Regards,
    Tom L.

Maybe you are looking for

  • Illsutrator 2014 cc issue

    Have not ever had an issue with Illustrator but it is now crashing when I click the disable welcome screen, or file>new etc. I am on Yosemite and it has been bug free til now. I have reinstalled, uninstalled, freed up permissions, deleted preferences

  • Password pop-up in email, calendar and notes

    Every time I go into my calendar, notes or email on my phone or ipad it prompts me that I need to enter my Yahoo password. I can push cancel or enter it. Either way nothing happens. How do I get it to stop!?

  • 2006 Mac Pro & EFI Firmware Update 1.2

    Wondering if anyone has any thoughts on this... Just upgraded to Snow Leopard and was prompted to apply the EFI Firmware Update 1.2... so I did as requested... MP shuts down and I hold down the power button until I see the power light pulse rapidly..

  • Arch package manager to see whats avaiable?

    Ubuntu has synaptics and add/remove option  , what does arch have? Right now with pacman im just taking a stab in the dark , but how can i see what is available for me to install? Need something similar to synaptics that shows the programs, and tells

  • A specific save for web/save as problem

    I'm trying to save jpg images with a background of 245 245 220 and no matter what I do, I get 245 245 221. I have done suggested color mgt stuff. Other colors seem to work fine but not this particular one. I have never had this issue before! It is fo