Front panel locks with event structure loop and another while loop

Hi,
Why is the front panel locking after changing the value of the "boolean switch" twice? This problem disappears if I uncheck the "lock front panel" option in the event case. However I don't understand why that is the case since the event structure loop has already finished executing.
thanks

Do you really want the event handling to stop after detecting the first event? If so then as Christian says the event structure will cause the front panel to lock. What you can do is dynamically register and unregister the events. You right click on the event structure and enable "Show Dynamic Event Terminals" Then  you can programatically register and unregister events.
Here is your vi modified to do that.
Edit: Just in case - right click on the control and create a reference. When selecting the source of the event in the structure look under the dynamic section.
=====================
LabVIEW 2012
Attachments:
event structure test.vi ‏13 KB

Similar Messages

  • Event structure front panel lock

    hi, I have a mouse down event for pushbutton on the front panel to trigger an event. The event structure is under a while loop. However, I checked 'lock FP during the process' but the pushbutton actually registers the mouse click. i.e. once i click the pushbutton during the event(which is supposed to be locked), the event will be triggered again automatically after the current round.
    Does anyone know how to fully lock the button? I even add in property node to disable the button in the beginning of the event case but it doesn't work as well.
    Thanks a lot.
    Cheers,
    SSR 

    Hi,
    The option is to 'Lock the front panel until the event case for this event completes'. If you have this checked, then all other controls are locked until the event triggered by the mousedown completes.  It does not prevent the event from registering in the first place. The mousedown will still register and it's event code will execute regardless if this checkbox setting (unless another event is being processed at the time).
    Mousedown also registers if you disable the control either programatically or via the menus - you need to change the event to 'Value Change' instead of Mouse Down. If you do this and programatically alter the enabled stated of the control, you can control whether the event is processed or not.
    HTH
    Steven
    edit: stevem181 beat me to it and in fewer words too
    Message Edited by Steven_G on 11-02-2009 10:33 AM

  • Loop with event structure

    I put an "event structure" inside of a while loop. My target is to keep the
    VI running and make selections to run different subVI. But I got two
    questions:
    1. how to use two button on front panel? I mean, when I press one button,
    step 1 runs, when I press the other button, step 2 runs. Is event structure
    the best way to do that? another side quesition is that how I can make the
    button jump back after I pressed it? It kept in the "down" position and I
    have to press it again to release it.
    2. When I test the VI, I found the while loop can't stop. The boolean input
    of false won't stop the VI. I wonder if there is a rule that the event
    structure must run at least once? or any other hidden properties I didn't
    notice?
    thank you very much!
    cheng

    "Michael Sachs" wrote in message news:...
    > You can change the boolean's mechanical action to a latched type and then it
    > will pop back up.
    > The event structure has a timeout input that defaults to infinite. If the
    > event loop is waiting for an event or timeout then your outer while loop
    > will not cycle. Use the hightlight execution lightbulb on the diagram to
    > see what the data flow is doing.
    >
    > Mike Sachs
    > Intelligent Systems
    >
    > "Cheng" wrote in message
    > news:[email protected]...
    > > I put an "event structure" inside of a while loop. My target is to keep
    > the
    > > VI running and make selections to run different subVI. But I got two
    > > questions:
    > >
    > > 1. how to use two button on front panel? I mean, when I press one button,
    > > step 1 runs, when I press the other button, step 2 runs. Is event
    > structure
    > > the best way to do that? another side quesition is that how I can make the
    > > button jump back after I pressed it? It kept in the "down" position and I
    > > have to press it again to release it.
    > >
    > > 2. When I test the VI, I found the while loop can't stop. The boolean
    > input
    > > of false won't stop the VI. I wonder if there is a rule that the event
    > > structure must run at least once? or any other hidden properties I didn't
    > > notice?
    > >
    > > thank you very much!
    > >
    > > cheng
    > >
    > >
    Hi Cheng,
    that's not quite the whole story. The event structure breaks down
    into two types. Those that get actioned between the start of the event
    (i.e. mouse down) and the result of that event (i.e. the button
    registers true) which are filtered events, and the other type (like
    mouse up) which occur after the event and the result of the event.
    With filtered events you can modify the result of the event as it
    happens. Whichever you choose to use, you need to do one of two things
    to get the button to pop back up (setting to latch when pressed on
    it's own won't work) - you can either read the FPTerm within the event
    itself with this set to Latch when pressed, or (my prefered method) is
    to use the CtrlRef that's available inside the event, and use the
    ActiveX method Reset to Default. This way the FPTerm for the button
    can be left somewhere else, and it's more obvious what the program is
    doing at this point.
    Your while loop is actually a do {} while loop, i.e. it must execute
    at least once before it checks to see if it should iterate again.
    Mike's suggestion of follow the hi-light execution is the best
    solution.
    Hope that helps
    Sash.

  • Lock front panel until the event case for this event completes

    A Dynamic Event is a filtered event? Is this why "Lock front panel until the event case for this event completes" is not shown on Edit Event window dialog? I use Dynamic Event so I can subvi the event structure.
    I need stop my app from locking the FP whenever the user double clicks on the numerical array value (<-- the FP freezes the mouse and renders it useless) and stops the value from ever being changed. This event is registered for Value Change (not mouse up or down) and I get a locked mouse. As yet in the UI, no value changed occurs but I get a locked mouse. A LV bug?
    Trying to KISS, I can see this fixing this by moving ONLY the value change event to the top level VI instead of a dynamic registered event in a subVI. This will give me the option to NOT "Lock front panel until the event case for this event completes" .
    Solved!
    Go to Solution.

    richjoh wrote:
    Thx, Ben that fixed the problem when I unchecked "Lock panel...".
    So it appears LV locks the panel during runtime once the Dynamic Reg Events is on BD and it doesn't matter if your case to handle the Reg Events is created or NOT... interesting. That's why my mouse persisted to "freeze up" although I deleted the case for my FP array.
    Its situation like what you described that has given me many insights into how LV actually works. In one of my bbuggy VI's I found that a class wire can run a million miles through multiple sub-VI queues etc but the data itself is only touched when it has to be touched. in my case it was a crash while trying to write bogus class dat to a TDMS file.
    I am glad you are back on course.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • I am using the "Menu Selection With Events.vi" example alongside other while loops, When I select exit from the new menu it stops the other while loops but not the menu/event while loop

    The event driven menu example works fine and I've integrated it into my application. I have built in simple local vars to link menu selections to existing GUI buttons. The problem is that I cannot get the File-Exit menu option to switch off/terminate the application. The [1] "Stop": Value Change panel of the event structure simply switches off the other while loops but leaves the event while loop running. Add a while loop to the axample using a local var from the event while loop to terminate 2nd while loop to get the effect.
    Help appreciated, Chris

    Attached you will find a modified version of your VI.
    I documented what I did on the block diagram.You were right on you just needed to add a variable with a true wired to it.
    Have fun with it.
    Joe
    Joe.
    "NOTHING IS EVER EASY"
    Attachments:
    Menu_Selection_with_Events_%26_while_loop[1].vi ‏76 KB

  • Front panel locked up?

    I'm using the System Control UI Suite 2.0 and trying to work with graphs on my VI.  Frequently my front panel appears to "lock up".  I'm apparently able to move around the front panel, however the front panel graphics themselves do not change location.  If I hit "ctrl-A" to select all front control objects, the marquees themselves appear where the control 'should' be.  If I close the VI and reopen it, the controls appear where I moved them previously.  It's as if the front panel image itself is not updating properly.
    This does not appear with other VIs. I can get around it by deleting the graphs, saving the VI, renaming the VI, and reopening it.  For whatever reason this sequence restores it.  Once I add the graphs and attempt to populate them with data in run time, my front panel locks up again.

    Hi Synaesthete,
    I am curious, do you see the same behavior when using only the stock LabVIEW controls? Have you tried replacing the UI Control Suite System Controls with the stock LabVIEW controls and seeing if the behavior still exists?
    Also, do the controls only lock-up when in edit mode or do the controls become unresponsive while executing the VI as well?
    Milan

  • I need help with event structure. I am trying to feed the index of the array, the index can vary from 0 to 7. Based on the logic ouput of a comparison, the index buffer should increment ?

    I need help with event structure.
    I am trying to feed the index of the array, the index number can vary from 0 to 7.
    Based on the logic ouput of a comparison, the index buffer should increment
    or decrement every time the output of comparsion changes(event change). I guess I need to use event structure?
    (My event code doesn't execute when there is an  event at its input /comparator changes its boolean state.
    Anyone coded on similar lines? Any ideas appreciated.
    Thanks in advance!

    You don't need an Event Structure, a simple State Machine would be more appropriate.
    There are many examples of State Machines within this forum.
    RayR

  • I have this icon on the top right of my screen that is a lock with like a circle and arow around it that wont go away, what does it mean?

    I have this icon on the top right of my screen that is a lock with like a circle and arow around it that wont go away, what does it mean?

    Here's the answer:
    https://discussions.apple.com/message/15098215#15098215
    https://discussions.apple.com/message/15622244#15622244

  • Multiple errors from MsiInstaller with event id 1015 and text "Failed to connect to server. Error: 0x80070005"

    Hi,
    Every night I get a lot of warnings in the event log from MsiInstaller with event ID 1015 and text "Failed to connect to server. Error: 0x80070005". They are always followed by a new event 1035. Example:
    Event 1015, MsiInstaller (Warning)
    Failed to connect to server. Error: 0x80070005
    Event 1035, MsiInstaller (Information)
    Windows Installer reconfigured the product. Product Name: Microsoft Excel Mobile Viewer Components. Product Version: 14.0.4763.1000. Product Language: 0. Manufacturer: Microsoft Corporation. Reconfiguration success or error status: 0.
    I probably get around 50 of these each night, and the 1035 events are all related to various SharePoint components. The user in all cases is the sharepoint farm account.
    I use SharePoint 2010 enterprise in a farm install on one virtual server. I have a private domain, and the database is on a separate server.
    Does anyone have any idea why this happens? Other than the error in the event log I cannot see any issues with my installation. I have searched for this error and seen it related to user profile synchronisation, but profile sync is working fine for me. I
    installed using the Technet guide and the user profile sync guide at
    http://www.harbar.net/articles/sp2010ups.aspx
    Thanks,
    Mikael

    Hey Trevor. Thanks. I wasn't sure which method it was failing on although I understood it was the Windows Installer Service that was getting called by the job. There are three things that are still interesting to me though:
    The job succeeds anyway. How? Does it just continue to run the rest of its checks but fails on this one? If it doesn't fail on this one, why not? If it does fail here, but then continues, should we be concerned about the quality of the data in Manage Patch
    Status? 
    Or... does it somehow succeed once it uses the DCOM rights which appear to clear the 10016 errors? What I've never been able to reconcile with these warnings is that we've granted DCOM rights to launch and activate the Windows Installer Service and
    that definitely seems to make a difference to success or failure of the job - so why doesn't it clear these warnings? 
    Why does granting the file system permissions clear the FIM version of this job's warnings, but not for the Product Version Job? This is particularly vexing since granting the DCOM rights appears to resolve the 10016 errors in exactly the same manner for
    both jobs. 
    All of this has led me to believe that there were missing permissions somewhere, probably on the file system, but I just haven't had any luck pinning that down. One reason why I continued to pursue a solution to this is that the job doesn't actually try
    to install anything, it's just trying to use the Windows Installer Service to query the installed version, and the DCOM rights should be sufficient to invoke the service. But getting much further than this has proven pretty difficult since I'm not a dev and
    I've kind of pushed my limited reflection skills and understanding of the Windows Installer Service to the limit. If anyone can chip in and make some progress from this point, it'd be great to join forces! 

  • Old Audigy Front Panel Compatible with Audigy 2 ZS c

    Is the Audigy Platinum front panel compatible with the Audigy 2 ZS card..
    kinTap

    sry to bump.. but I would like to install the new card... will this work?

  • Any experience with tep pocket WiFi and skype while traveling

    Anyone had any experience with tep pocket WiFi and skype while traveling. Seems like a good solution in the UK

    Did you ever get an answer to this or take the plunge? I'm curious what you found out...

  • Using a "menu ring" feature on the front panel with event structures

    hello - right now i have many event cases controlled by many "ok buttons". i would like to use a menu ring on the front panel to save space from all those buttons, but i don't see how it will work with all the individual event cases. currently each event is tied to a single button, and the menu ring acts as one thing on the block diagram so i can't tie an event to a choice in the menu. any suggestions? thanks....

    Alternativley, you could use an enum control instead of a menu ring. It will name the cases according to the selection automatically.
    If you want to use a menu ring and strings, you could do something like in this image.
    Message Edited by altenbach on 02-09-2006 01:43 PM
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    RingText.png ‏3 KB

  • How do I center and/or maximize the front panel on every event?

    Hi,
    So basically I have a little issue with trying to maximize and then scale back a VI's front panel every time a user selects a different option from a ring control.
    So far i've been using the LVWINUTIL.LLB and the provided window size vi to set the size I want on ring selection change which works fine, but as far as centering the VI goes, the method I'm calling only works the first time. After it maximizes and I select a different option on my ring control which is linked to a case within a while loop it simply resizes to the size i set which is correct but when I got back to the ring case which is supposed to maximize the front panel again, it doesn't do it. Centralizing the FP also only works once.
    I'm  using FP.Run-Time Position.Centered to try and center the VI....only works once. I do understand that this might be the desired behavior since the name is run-time position meaning it'll only do this when the VI is first run, however I need this to happen more then once, how can i do this? Thanks...

    How did you center the FP?
    Their a method that should work time after time.
    Ton
    Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
    Nederlandse LabVIEW user groep www.lvug.nl
    My LabVIEW Ideas
    LabVIEW, programming like it should be!

  • Logic AND with event structure

    hi everyone,
    The event structure can handle multiple events at a time to do the same thing : looks like a logical OR. But I haven't found a way to sequence events to approach a logic AND. Example: first click on a Draw button and then enter the image would make the mouse cursor change. With an event structure, I can handle these 2 events separetely or together (either one would change the cursor), but i cannot make a sequence of events.
    Is this possible to do that with an event structure?
    I hope I am clear (sorry for the english btw). And thanks in advance.
    Christophe
    Solved!
    Go to Solution.

    Mark Yedinak wrote:
     In the event processing you would have to check if the required event occurred before this event. If it did, do your processing. If not ignore the event.
    That's exactly what I am trying to do! I am already working with a producer/consumer architecture and with a state machine in the consumer loop. I tried to add state info as you suggested in the event loop. But i do not know if i am doing this well. I attach a very small example where I try to demonstrate what I am trying to do with 2 booleans to be pressed in order.
    Tell me what you think of the state info in the event loop.
    @Mike : same solution as Mark if I use a shift register and a case structure inside the event loop?
    Message Edited by superfunk on 03-03-2010 10:24 AM
    Attachments:
    event_test.vi ‏27 KB

  • Minimise front panel of vi containing timed loop = problem

    Is this expected behaviour...
    Run the attached VI.
    All it is supposed to do is beep every 10 cycles.
    When you minimise it and try to restore the front panel though... it locks up for a random amount of time.
    I don't think it is supposed to do that. (I'm running it on XP Pro.)
    Originally I was chasing this problem in a data acquisition loop. The buffer would overflow and exit the app with an error when it was minimised.
    It took all day to track it down to this.
    Hmmm... I just tried to save it back to a version 8.0 vi and it doesn't seem to have the same error!
    Message Edited by Troy K on 10-03-2008 05:26 PM
    Message Edited by Troy K on 10-03-2008 05:31 PM
    Troy
    CLDEach snowflake in an avalanche pleads not guilty. - Stanislaw J. Lec
    I haven't failed, I've found 10,000 ways that don't work - Thomas Edison
    Beware of the man who won't be bothered with details. - William Feather
    The greatest of faults is to be conscious of none. - Thomas Carlyle
    Attachments:
    Timed Loop minimised.vi ‏85 KB
    minimisetimedloop.png ‏7 KB

    I'm using LabVIEW 8.5.1 on two PCs and it does it on both of them.
    I just emailed the vi to a colleague and after a few minimise/maximises it locked up on him too.
    I've just found that if I remove the left and right data nodes inside the timed loop the bug seems to go away.
    Steps to repeat bug:
    1. Minimise all windows (Windows+m)
    2. Restore vi front panel and run it. (It should start beeping twice a second)
    3. Minimise / Restore it rapidly by repeatedly clicking on the vi's Front Panel 'task bar button' (down the bottom).
    After a while the beeping will stop when the front panel is minimised and it wont restore. Then after a while (with or without clicking on the task bar button) the front panel will restore and the missed periods will execute very quickly (as the timed loop does what it is configured to do).
    I think because of the simplicity of the example vi the bug doesn't show up as often. When I ran it in the real application (too many vi's to post) it crashed every time. In the real application there isn't much going on in the timed loop, it is just used to queue items into a separate consumer loop. The problem is that when the bug occurs, ALL LABVIEW CODE stops executing, not just the code inside the timed loop. So another vi running in parallel (in a daemon) that retrieves messages from a device queue stops and the device buffer overflows.
    Attached is a modified vi to demonstrate that code outside the timed loop stops executing too. The bug occurs here on three different PCs, the only common thing I can think of is LabVIEW 8.5.1.
    Troy
    CLDEach snowflake in an avalanche pleads not guilty. - Stanislaw J. Lec
    I haven't failed, I've found 10,000 ways that don't work - Thomas Edison
    Beware of the man who won't be bothered with details. - William Feather
    The greatest of faults is to be conscious of none. - Thomas Carlyle
    Attachments:
    Timed Loop minimised 2.vi ‏89 KB

Maybe you are looking for