Dynamic user events freeze user interface

Hi all,
I am having problem with dynamic user events.
Dynamic user event is registered to the event structure, and many dynamic user events come in very fast, about every 30 ms. It freezes up the user interface, no response to mouse and keyboard, even after all user events finish execution.
Any idea or work around?
Thanks for any help.
Anne

Hi Anne,
> Dynamic user event is registered to the event structure, and many dynamic user events come in very fast, about every 30 ms.
The 30ms rate is not unreasonably fast as long as the processing for the event(s) can be completed in less than 30ms.
What tasks are you doing in the User Event?
For tasks that may take time to complete (like logging) you could queue up the data and send it to a consumer loop.
> It freezes up the user interface, no response to mouse and keyboard, even after all user events finish execution.
My *guess* here is that you got stuck in an event that never completed.
steve
Help the forum when you get help. Click the "Solution?" icon on the reply that answers your
question. Give "Kudos" to replies that help.

Similar Messages

  • Producer Consumer & User Events with user input windows

    Hello All,
    I am planning to build Labview code using the Producer Consumer & User events pattern, the application needs multiple user input windows for things like personal data, feature selection etc, there could be around 15 or 20 distincts screen/panels required.
    The main question from me is... Is there a best practive approach to navigating/loading from one window to another etc, and also providing a way to to retrun to the previous window.
    Also I may need need to be running some slow logging and control hardware in the background while navigating some of the screens, this seems like the producer consumer vi will be running in the background while the user input causes a load/display window event.
    A simple Producer Consumer multiple winjdoow example would be very welcome. Thanks.
    Regards Chris

    I will second Mike's suggestion to use a central VI with subpanel(s).  It is usually less confusing than multiple windows.  Typically, the selection/navigation mechanism is on the left of the main panel, global info (like help) on the right, and the subpanel(s) in the center.
    The advantage of subpanels/subVIs is that you can launch your subVIs and keep them active in the background, even though they are not being used.  This means they will keep their state information and load into the subpanel almost instantaneously the next time you need them.  For a short tutorial on subpanels, check out this link.  Scroll down to the fourth reply for working code.  The original code posted is broken.
    Communication between your VIs or loops is typically done with either queues or event structures.  State information in each should be shift registers in the respective VIs.  If you have the time, I would highly recommend you learn how to use LabVIEW classes.  The command pattern is tailor made for this kind of application.
    Finally, avoid global data if you can.  Global data is anything that you can get to from anywhere (globals, functional globals, etc.).  Use of these can speed your development, but can also lead to sloppy design which will cause you major problems later.  If you really need globally available data, use a data value reference.  It is unnamed and requires a reference, which tends to enforce better programming practice.  Yes, there are instances where you truly need globally available, named data, but they are fairly rare.  You should only use them if you are experienced and really know what you are doing.
    This account is no longer active. Contact ShadesOfGray for current posts and information.

  • Force a user event

    Hi,
    In a point of my vi I want to force a user event in order to enter in
    an event case in run time. I want to simulate an event over a
    multicolumn listbox, for example, Double Click.
    How can I do it? Some example?
    I am working with Create user event, generate user event and destroy user event but I don't know how it works.
    Thanks very much,
    ToNi.

    tonitpp wrote:
    Sorry, the object over I want to force an event is a button and not a multicolumn listbox. It works but.... when I force a Double Click event over that button the user can see how the button is pressed automatically and I don't want the user see it, I would like to do it transparent to the user. I use a value (signaling) property node and I associate to it a true value. Another way to do it?
    The event also gets triggered if you wire a FALSE to the Signaling property. It does not matter if the value actually changes, only that the signaling property is written to trigger the event. Try it!
    LabVIEW Champion . Do more with less code and in less time .

  • Xcontrols and dynamic User Events

    Hi all,
    I'm trying to build a XControl with an Event Structure that accepts User Events generated by a separate parallel loop on the block diagram.
    A monitoring loop with its own Event Strucure on the block diagram seems to handle the User Events generated by my producer loop but the XControl seems to ignore the User Events.
    Example LabView 8.5.1 project is attached
    Any ideas?
    Attachments:
    XControl.zip ‏75 KB

    Hi Anne,
    > Dynamic user event is registered to the event structure, and many dynamic user events come in very fast, about every 30 ms.
    The 30ms rate is not unreasonably fast as long as the processing for the event(s) can be completed in less than 30ms.
    What tasks are you doing in the User Event?
    For tasks that may take time to complete (like logging) you could queue up the data and send it to a consumer loop.
    > It freezes up the user interface, no response to mouse and keyboard, even after all user events finish execution.
    My *guess* here is that you got stuck in an event that never completed.
    steve
    Help the forum when you get help. Click the "Solution?" icon on the reply that answers your
    question. Give "Kudos" to replies that help.

  • RE: (forte-users) Events in Interface

    I know, I've implemented similar structures in other locations as well,
    always without problems. I've even recreated the whole interface, building
    it completely from dragging and dropping methods and events from the class
    to the interface. Then I did a force compile of the whole workspace. It
    still doesn't solve the problem. There must be some combination of things
    that were different in the other circumstances, but I don't seem to be able
    to find it. It's definately not an error in the code. There something wrong
    in Forte internally, but I don't know which combination of factors causes
    it.
    Pascal Rottier
    Atos Origin Nederland (BAS/West End User Computing)
    Tel. +31 (0)10-2661223
    Fax. +31 (0)10-2661199
    E-mail: Pascal.Rottiernl.origin-it.com
    ++++++++++++++++++++++++++++
    Philip Morris (Afd. MIS)
    Tel. +31 (0)164-295149
    Fax. +31 (0)164-294444
    E-mail: Rottier.Pascalpmintl.ch
    -----Original Message-----
    From: Moris_Mihaildis/AUST/CSCcsc.com
    [mailto:Moris_Mihaildis/AUST/CSCcsc.com]
    Sent: Tuesday, April 03, 2001 5:00 AM
    To: Rottier, Pascal
    Cc: forte-userslists.xpedior.com
    Subject: Re: (forte-users) Events in Interface
    FYI. We are using Forte 3.0.J.4 and NT4.0 SP6, and have had no problems
    implementing your pattern.
    There should be no need for a fix (cast). There is something wrong with
    your interface.
    Regards,
    Moris Mihailidis
    Consulting
    CSC
    Level 4, 570 St. Kilda Road, Melbourne VIC 3004
    Ph: 61-3-95364675 Fax: 61-3-95364633 Email: mmihailicsc.com.au
    "Rottier, Pascal" <Rottier.Pascalpmintl.ch> on 04/02/2001 09:52:46 PM
    To: "'Forte Users'" <forte-userslists.xpedior.com>
    cc:
    Subject: (forte-users) Events in Interface
    We have the following scenario:
    There is a Service Object that acts as a Facade (Facade pattern) for 3
    manager classes that implement some business functions. Each of these three
    managers are stored as private attributes on this Service Object.
    For the sake of flexibility, these three private attributes are defined by
    their Interface, not their class. When the Service Object opens an Event
    Loop and registers for the events of one of these interfaces, the whole
    partition crashes. Even when using the running man in the development
    workshop, the whole partition crashes. The only way to fix that is to cast
    the Interface to a class that implements the interface before registering
    for the event.
    I know it's possible to register for events using an Interface that
    contains
    these events, rather then a class that implements the events. Of course, at
    runtime you do need a real instance of a class that implements the
    interface, otherwise you get a NIL-exception.
    Does anyone have any experience registering for events from Interfaces? Are
    there unexpected circumstances where it should work semantically, but still
    causes Forte to crash. We're using Forte 3.j.1 on NT 4.0 SP 6.
    Any help is appreciated.
    Pascal Rottier
    Atos Origin Nederland (BAS/West End User Computing)
    Tel. +31 (0)10-2661223
    Fax. +31 (0)10-2661199
    E-mail: Pascal.Rottiernl.origin-it.com
    ++++++++++++++++++++++++++++
    Philip Morris (Afd. MIS)
    Tel. +31 (0)164-295149
    Fax. +31 (0)164-294444
    E-mail: Rottier.Pascalpmintl.ch
    For the archives, go to: http://lists.xpedior.com/forte-users and use
    the login: forte and the password: archive. To unsubscribe, send in a new
    email the word: 'Unsubscribe' to: forte-users-requestlists.xpedior.com

    I know, I've implemented similar structures in other locations as well,
    always without problems. I've even recreated the whole interface, building
    it completely from dragging and dropping methods and events from the class
    to the interface. Then I did a force compile of the whole workspace. It
    still doesn't solve the problem. There must be some combination of things
    that were different in the other circumstances, but I don't seem to be able
    to find it. It's definately not an error in the code. There something wrong
    in Forte internally, but I don't know which combination of factors causes
    it.
    Pascal Rottier
    Atos Origin Nederland (BAS/West End User Computing)
    Tel. +31 (0)10-2661223
    Fax. +31 (0)10-2661199
    E-mail: Pascal.Rottiernl.origin-it.com
    ++++++++++++++++++++++++++++
    Philip Morris (Afd. MIS)
    Tel. +31 (0)164-295149
    Fax. +31 (0)164-294444
    E-mail: Rottier.Pascalpmintl.ch
    -----Original Message-----
    From: Moris_Mihaildis/AUST/CSCcsc.com
    [mailto:Moris_Mihaildis/AUST/CSCcsc.com]
    Sent: Tuesday, April 03, 2001 5:00 AM
    To: Rottier, Pascal
    Cc: forte-userslists.xpedior.com
    Subject: Re: (forte-users) Events in Interface
    FYI. We are using Forte 3.0.J.4 and NT4.0 SP6, and have had no problems
    implementing your pattern.
    There should be no need for a fix (cast). There is something wrong with
    your interface.
    Regards,
    Moris Mihailidis
    Consulting
    CSC
    Level 4, 570 St. Kilda Road, Melbourne VIC 3004
    Ph: 61-3-95364675 Fax: 61-3-95364633 Email: mmihailicsc.com.au
    "Rottier, Pascal" <Rottier.Pascalpmintl.ch> on 04/02/2001 09:52:46 PM
    To: "'Forte Users'" <forte-userslists.xpedior.com>
    cc:
    Subject: (forte-users) Events in Interface
    We have the following scenario:
    There is a Service Object that acts as a Facade (Facade pattern) for 3
    manager classes that implement some business functions. Each of these three
    managers are stored as private attributes on this Service Object.
    For the sake of flexibility, these three private attributes are defined by
    their Interface, not their class. When the Service Object opens an Event
    Loop and registers for the events of one of these interfaces, the whole
    partition crashes. Even when using the running man in the development
    workshop, the whole partition crashes. The only way to fix that is to cast
    the Interface to a class that implements the interface before registering
    for the event.
    I know it's possible to register for events using an Interface that
    contains
    these events, rather then a class that implements the events. Of course, at
    runtime you do need a real instance of a class that implements the
    interface, otherwise you get a NIL-exception.
    Does anyone have any experience registering for events from Interfaces? Are
    there unexpected circumstances where it should work semantically, but still
    causes Forte to crash. We're using Forte 3.j.1 on NT 4.0 SP 6.
    Any help is appreciated.
    Pascal Rottier
    Atos Origin Nederland (BAS/West End User Computing)
    Tel. +31 (0)10-2661223
    Fax. +31 (0)10-2661199
    E-mail: Pascal.Rottiernl.origin-it.com
    ++++++++++++++++++++++++++++
    Philip Morris (Afd. MIS)
    Tel. +31 (0)164-295149
    Fax. +31 (0)164-294444
    E-mail: Rottier.Pascalpmintl.ch
    For the archives, go to: http://lists.xpedior.com/forte-users and use
    the login: forte and the password: archive. To unsubscribe, send in a new
    email the word: 'Unsubscribe' to: forte-users-requestlists.xpedior.com

  • Dynamic user event

    Hello, I am a newbie regarding dynamic user events.
    Basically, I want to create a user event that triggers  an event structure in a subvi.
    To do this, I wire up a "create new user event" and then pass the refnum to my subvi "more info" as seen below.  But this piece of code get's stuck in the sub-vi and never leaves :[
    here is my subvi below:
    I'd greatly appreciate any help :]

    To stop your main vi you will need to provide a mechanism to stop your sub vi.
    I would use an additional boolean User Event to do this.
    (This could be shared among other subvis).
    When the (let's call it) Shutdown event is received, set your subvi while loop control terminal true.
    Note: When using this scheme in an exe file, if the subvi front panel is open and you shutdown the main vi, the subvi can remain open. This happened to me using LabVIEW 2010. I had to use a Front Panel Close Method to avoid this issue.
    When using the Front Panel Close Method you should first check if the front panel is open or not to avoid an error.
    Help the forum when you get help. Click the "Solution?" icon on the reply that answers your
    question. Give "Kudos" to replies that help.

  • Crashing LabVIEW with dynamic user events

    Hello,
    we are able to execute the attached sample with a german LV 8.2.1 on a Pentium 4 2.4 GHz PC with 1GB Ram and W2K SP4.
    However we seem to have problems on a faster machine with an english Windows XP Server but also LV 8.2.1. Could this please be verified?
    So start the test, first manualy load the "Button Menue 13.vi", then the "Button Wrapper 13.vi" and finally the "Button Receiver 13.vi".
    After this activate "Button Menue 13.vi" and let it run for a short while. After softly stopping "Button Menue 13.vi" with the local "Stop"-button, all VIs should indicated the identical amount of received dynamic user events.
    On our local PC we can run sucessfully and quickly to e.g. 10000 events and more.
    Attachments:
    ButtonTest13.zip ‏52 KB

    Hello,
    after disabling hyperthreading in the BIOS the english XP Professional and the examples now run nicely!  

  • Missing dynamic user events across VIs

    We have a sub-Vi Statemachine.vi, which has its own event structure with a 5ms time-out, everything enclosed into a loop.
    This sub-VI is called repeatedly from the main application with command lists to execute. This can be a longer list or e.g. an empty list.
    It turned out, that we can miss successfully sent events, despite the documented internal queues.
    Placing the event structure into an added parallel executing, non-terminating loop in the sub-VI seems to help.
    Is there a link to further informations about this behaviour? We are using a german LV 8.2.1.

    Martin,
    I don't know of a good document describing the use of the user event in the way the you and I are using them.
    I've learned from bits and pieces lying around and my collegue. After using it for two years now I have a framework in which the use of user events is relatively easy.
    I know this doesn't help you a lot, but I know that if get the hang of it, it will provide a good and usable architecture.
    I hope the attachments helps you a bit. It is the way I define user event for inter process communication. It will get rid of a lot of wiring.
    Kind regards,
    André
    Regards,
    André
    Using whatever version of LV the customer requires. (LV5.1-LV2012) (www.carya.nl)
    Attachments:
    Event buffer.zip ‏13 KB

  • User Events Generation - TicTacToe

    Hey everybody,
    In order to get a better understanding of how the event structures are used, I have been playing around with making a tic tac toe game (ironically, i did not know that was a coding challenge until I just started this thread). 
    Anyways, the way I'm doing it is by dynamically registering a mouse move event during mouse down on a boolean control (your game 'marker').  Then when the control is moved overtop of an activex container the boolean lights up.  Right now, however, it only works for one of the game pieces ('Dot 8').
    My question is this, can someone please show me how to create a user event?  I want to create an event where when any boolean control's position is within the bounds of the activex containers it will light up.  I could do this manually with a whole lot of logic (you'll get the idea if you check out the code) but that is rediculous and wouldn't help my learning exercise at all.
    Thanks so much for the help!
    Jonathan
    (Code is attached)
    Attachments:
    events.vi ‏107 KB

    If you want to look at the code of my interface posted HERE, See attached (LabVIEW 7.1). It uses simple mouse-down events on the array indicator to determine where to place the correct piece.
    Enjoy!
    (Disclaimer: The code is not fully tested and documented. There could be bugs There is also room for improvements)
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    TTT-Trainer3.zip ‏2139 KB

  • How to use "User Events" in different parts of an application

    Hi,
    "You programmatically can create and name your own events, called user events, to carry user-defined data. Like queues and notifiers, user events allow different parts of an application to communicate asynchronously. You can handle both user interface and programmatically generated user events in the same Event structure."
    What you read was part of labview 7.1 user manual ( Chapter 9 - pg.12 ). I've some problems with the underlined sentence. I hope someone can help me.
    When using Queues, the programmer may use a named queue everywhere in the application. there is no need to wire queue reference among VIs or using global variables to store queue reference. the name of the queue will be all that you need. I wonder if it is also possible with a event refnum that is the output of "Register for Event" node. As far as I've tested. the answer is Negative! I tried to copy-paste refnum in front panels and using the same name. but there is no connection between event refnums.
    LV User manual claims that user events can be used like queues, but it doesn't seem so.
    Does anybody have an idea?
    Best Regards.

    I didn't look at Damien Gray's presentation recently, but if I remember it correctly, it is on a much higher level than what I meant, because it refers to LARGE application. This is a very simple one.
    Using a functional global is not problematic CPU-wise, nor memory wise (unless you get into really big data structures, like hundreds of MBs), so you shouldn't be afraid to use it. I'm also not sure why you're afraid of the loop. The loop is only there to "hold" the USR. It only runs once. If you want, you can replace it with a for loop that runs once. I've recently learned that apparently, you can also get rid of the loop and use a local variable (look at the example called XY chart) instead of a USR. I don't think a local variable should have any more impact than a USR, but that needs to be tested. It can definitely be more convenient for some VIs where you don't have to wire the SR through the entire VI.
    Anyway, you will need to have an "obtain ref" VI which will hold a 1D array of names and a corresponding array of refs. Then, you search the array for the name, and if it finds the name, it extracts the correct reference. You will also need a way to input references and names into the array and possibly a way to empty the array. You may need to have 2 levels - the inner VI will be the LV2 VI and the parent will be the obtain ref\fill array\close VI. You will need some error handling as well - what happens if you search for a name and it can't be found and so on...
    Hope this helps.
    Try to take over the world!

  • Event Handler/Cr​eate User Event bug

    This is a problem I've run into a few times on my system (Win2k) so I finally went back and reproduced it step by step since it wasn't too hard. It causes LabVIEW to crash and exit without saving.
    - Create an Event Handler
    - Place 'Register Events', wire output to dynamic event terminal
    - Place 'Create User Event', wire output to 'Register Events'/User Event
    - Place an Empty String Constant [""], wire to input of 'Create User Event'
    - Set empty string property -> Visible Items > Label = True
    - Rename label from "Empty String Constant" to other such as "Event"
    OR
    - Create a cluster constant with something in it
    OR
    - Place a boolean constant
    - Set boolean property -> Visible Items > Label = True
    - Name label something su
    ch as "Event"
    - 'Add Event Case...' to the Event Handler, select Dynamic / : User Event
    - Delete the constant wired to 'Create User Event'.
    - Place a constant of a different data type and wire it to the input of 'Create User Event'
    LabVIEW immediately disappears (all changes are lost) and this error is displayed:
    ================================
    LabVIEW.exe has generated errors and will be closed by
    Windows. You wlil need to restart the program.
    An error log is being created.
    ================================
    If there is a more appropriate place to post things of this nature that don’t really add to the discussion group, but need to be brought to the attention of NI, please post a URL or submittal method. Thanks...

    Thanks for the detailed request. We are aware of this exact issue, and the problem was actually fixed for LabVIEW 7.0 for Mac/Unix. Unfortunately, it did not get fixed for the initial release of LabVIEW 7.0 for Windows, but we have plans to include the fix in the first LabVIEW patch for 7.0.
    Also, the Discussion Forum is great for notifications of this kind. For future reference, you also have the options of emailing NI engineers directly, or calling us with suspected bug fixes, if you would like more direct communication.
    Thanks again, and have a great day!
    Liz Fausak
    Applications Engineer
    National Instruments
    www.ni.com/support

  • Producer Consumer Subpanels, User events and DAQ

    Hello All,
    I am working on a Producer Consumer application and have beed looking at subpanels for user navigation. The application needs to be capable of responding to user generated events but also manage data received from attached data acquisition and control hardware. This is a 2 part question.
    I need to implement about 15 screens in this application and have started integrating subpanels. I need to be able to navigate from one subpanel vi to another using subvi buttons but dont understand how to build this functionality. Can I build functionlaity so that when I click on a subpanel loaded vi's button it will load the vi referenced by that button and the original dissappears.
    I have a 3 loop producer event template consisting of (1)data acquisition producer, (2) user event producer and (3) consumer loop but theres not much detail, are there any reasonable templates out there? I have seen the data- consumer and user-consumer but no mix of all 3.
    Advice appreciated
    Chris

    I use subpanels to host my display vi's and control them dynamically.  I would have a loop or vi process that manages your subpanel.  You could use user events, queues or notifiers to send messages to this subpanel manager to perform the basic functions such as loading a vi into a subpanel, removing a vi from subpanel (you can remove and stop the vi or keep the vi running in the background or even make it a floating vi.)  A subpanel button can create a local event which in turn could trigger a user event or message to the subpanel manager.  I have attached my subpanel manager to give you some ideas...
    Attachments:
    Subpanel Manager.vi ‏39 KB

  • How to catch events on user tables forms?

    Hi all,
    Is there any way to catch the events on user defined tables' form which opens from Tools-User Tables? The form Id we get is not unique so we can't initialize the form with that ID or put it in  an If  loop for pval.formUId.
    any clues?
    Thanks in advance.....

    Hi Binita,
    The UDT form should have a form type in the format:
    110xxx
    where xxx is the value in the TblNum field in the OUTB table (eg 110015 if the TblNum field is 15).
    Therefore, you can query the OUTB table for your UDT name and get the correct TblNum value and then calculate the correct form type for your table. If you want to filter events then you'll need to run this query as your addon starts and dynamically add the correct event types and filters to your addon.
    Kind Regards,
    Owen

  • Events without user intervention

    I am developing a control application in which in open loop the user has interaction with controls in the GUI and a generation of events begin an action. However in closed loop the controller generates the values and rewriten the values at the controls in the GUI without intervention of user in the GUI. The events are not identified within the events loop located within the white loop. I am trying to work with Dynamically Registering Events but i am not have sucess. The specific question is how generated an event when a value control changes  without the intervention of the user in the GUI

    Use a property node for the front panel control and select the property
    "Value (Signaling)". When writing to this property, the event is
    triggered.

  • Events/without user intervention at the GUI

    I am developing a control application in which in open loop the user has interaction with controls in the GUI and a generation of events begin an action. However in closed loop the controller generates the values and rewriten the values at the controls in the GUI without intervention of user in the GUI. The events are not identified within the events loop located within the white loop. I am trying to work with Dynamically Registering Events but i am not have sucess. The specific question is how generated an event when a value control changes  without the intervention of the user in the GUI

    Gracias por utilizar los foros
    la solucion ya la tienes en esta liga
    http://forums.ni.com/ni/board/message?board.id=170&message.id=196808#M196808
    saludos
    Erwin Franz R.

Maybe you are looking for

  • BAdI: ME_GUI_PO_CUST add customer field to item level

    Hi Experts, I want to add a customer field to PO item level, how to do that? the functional consultant told me to first implement the BAdI: ME_PROCESS_PO_CUST before I can use BAdI: ME_GUI_PO_CUST, can anyone show me the procedure on how to implement

  • Origin of Means of Transport when Crossing the Border

    Hello all When I create a purchase order (ME22n) I got a error that I have to fill this field Header => Import=> Handling  =>  Mns of trsp - border   (Field = EIKP-STGBE) Origin of Means of Transport when Crossing the Border ? Normally I don't have t

  • Outlook 2013 Email Header Being Cut Off

    Outlook 2013 is cutting off the email header on multiple emails.  See screenshot below.

  • Not start

    Not start after login I put my pass in login but not go, stay in screen only Apple in center no go

  • Cheque Payment PLD - AP Invoice no., Date, Vendor Ref. AP Invoice Amount

    hi all, I am trying to modify the Cheques for Payment PLD to include row details for each AP Invoice, included in the payment(these details are available in Outgoing Payments PLD) Details needed are:     Invoice Date      AP Invoice No     Vendor Inv