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.

Similar Messages

  • 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.

  • 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!  

  • Acquiring images and detecting user event simultaneously

    Hello,
    I'm building an interface to acquire and process still images and videos.
    As I'm a beginner in Labview, until now I haven't use multithreading, but I would like to improve my interface by allowing , for instance, the user to run the same process subvi for two different images ( there would then have two front panel popup window of the same subvi working on different images ) and to still be able to push some buttons in the interface to trigger another events. How could I do that and is it difficult to build ? For the moment, I used an architecture consisting in an event structure inside a while loop. Therefore I can't work on two images simultaneously.
    Thank you for your answer !

    > As I'm a beginner in Labview, until now I haven't use multithreading,
    > but I would like to improve my interface by allowing , for instance,
    > the user to run the same process subvi for two different images (
    > there would then have two front panel popup window of the same subvi
    > working on different images ) and to still be able to push some
    > buttons in the interface to trigger another events. How could I do
    > that and is it difficult to build ? For the moment, I used an
    > architecture consisting in an event structure inside a while loop.
    > Therefore I can't work on two images simultaneously.
    >
    It sounds like you want to asynchronously run one or more subVIs, and
    possibly get notified when they are closed. A regular subVI call waits
    until the
    subVI returns, which means that at least part of the calling
    diagram is waiting. If you use the VI Server to Open a VI reference and
    execute the Run method, you do not need to wait for the subVI. It is
    also possible to open another reference to a different VI, or to a
    different instance of a .vit, a VI template file. This is a common
    technique used to rum as many instances as you need of a subVI.
    Finally, if you need notification of completion, then you can set up a
    system using notifiers to pass the VI refnum and any additional data
    back to the calling VI just before the subVI completes, or you can try
    to use the VI close event and dynamic registration to intercept the
    close event and harvest any data as the subVI is being closed.
    Greg McKaskle

  • 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

  • IPM and dynamic user tracking not running properly.

    Hello, I've got two problems after a reinstallation of CiscoWorks LMS 3.2.
    Versions of software components:
    LMS-3.2
    Campus Manager-5.2.1
    CiscoView-6.1.9
    CiscoWorks Assistant-1.2.0
    CiscoWorks Common Services-3.3.0
    Device Fault Manager-3.2.0
    Integration Utility-1.9.0
    Internetwork Performance Monitor-4.2.0
    LMS Portal-1.2.0
    Resource Manager Essentials-4.3.0
    First probelm I have sounds pretty much like this thread:
    https://supportforums.cisco.com/message/3064784#3064784
    Source device is a WS-C3560-8PC - 12.2(55)SE1 - C3560-IPSERVICESK9-M
    I configured a IPM collector, if I have a look at the "Collector Management" the collector is running and I can also monitor the running collector.
    But if I have a look at the running config of the switch, there is no ip sla collector configuration but I can see the ip sla statistics via the show command.
    #sh ip sla configuration 135123
    IP SLAs, Infrastructure Engine-II.
    Entry number: 135123
    Owner: ipm|XXXS1077
    Tag: QA-Site1-Site2
    Type of operation to perform: udp-jitter
    Target address/Source address: target ip address/source ip address
    Target port/Source port: 2000/0
    Type Of Service parameter: 0xB8
    Operation timeout (milliseconds): 5000
    Codec Type: g729a
    Codec Number Of Packets: 1000
    Codec Packet Size: 32
    Codec Interval (milliseconds): 20
    Advantage Factor: 12
    Verify data: No
    Vrf Name:
    Control Packets: enabled
    Schedule:
        Operation frequency (seconds): 60
        Next Scheduled Start Time: Start Time already passed
        Group Scheduled : FALSE
        Randomly Scheduled : FALSE
        Life (seconds): Forever
        Entry Ageout (seconds): 3600
        Recurring (Starting Everyday): FALSE
        Status of entry (SNMP RowStatus): Active
    Threshold (milliseconds): 5000
    Distribution Statistics:
        Number of statistic hours kept: 2
        Number of statistic distribution buckets kept: 1
        Statistic distribution interval (milliseconds): 20
    Enhanced History:
    #sh ip sla statistics
    Round Trip Time (RTT) for       Index 135123
    Type of operation: jitter
            Latest RTT: 45 ms
    Latest operation start time: 14:36:31.759 MET Wed Mar 16 2011
    Latest operation return code: OK
    RTT Values
            Number Of RTT: 1000
            RTT Min/Avg/Max: 21/45/60 ms
    Latency one-way time milliseconds
            Number of Latency one-way Samples: 0
            Source to Destination Latency one way Min/Avg/Max: 0/0/0 ms
            Destination to Source Latency one way Min/Avg/Max: 0/0/0 ms
    Jitter time milliseconds
            Number of SD Jitter Samples: 999
            Number of DS Jitter Samples: 999
            Source to Destination Jitter Min/Avg/Max: 0/3/15 ms
            Destination to Source Jitter Min/Avg/Max: 0/1/9 ms
    Packet Loss Values
            Loss Source to Destination: 0           Loss Destination to Source: 0
            Out Of Sequence: 0      Tail Drop: 0
            Packet Late Arrival: 0  Packet Skipped: 0
    Voice Score Values
            Calculated Planning Impairment Factor (ICPIF): 11
    MOS score: 4.06
    Number of successes: 18
    Number of failures: 0
    Operation time to live: Forever
    #sh run all | include 135123
    Any suggestions? Am I right?
    The second problem is about the dynamic user tracking like these theads https://supportforums.cisco.com/message/3135881#3135881 or
    https://supportforums.cisco.com/message/3195492#3195492
    Access switches are configured properly, the configuration ran without any problems with the previous installation.
    No changes done at the configuration, using the default trap listener port etc.
    In the macuhic.log file I get entries like in the attached txt.
    When I try to run a full Campus Manager Data Collection I get the following errormessage:
    Failed to start acquisition: Construction of XML data required for UT is in progress.Please try after some time
    Also any suggestions? Am I right, too?

    By default IP SLA collectors installed by IPM do not appear in the running configuration.  If you want to install the collectors into the running configuration, then set the "Copy IPSLA Configuration to running-config" property under IPM > Admin > Application Settings, then delete and recreate the collector.
    Your Campus problem could be CSCtd49439 (a patch is available by contacting TAC).  However, you should start a new thread for your Campus problem.

  • Business logic callable object and Dynamic User assignment

    hi all,
    I have to design scenario using VC and GP
    using VC i designed a form that consist of some input parameters value,product..
    i integrated the designs created in VC to CO's
    My workflow should be like this
    now if the value<500
    it should go for approval to user1->user3
    if 500<value<1000  means it should go for approval to user1->user2->user3
    i tried this by using a businesslogic callable object
    the input ot this businesslogic CO is "value" parameter
    reult state
    continue BOOL(@value<500)
    break  Bool(500<@value<1000)
    process
    sequential block1
    Altenateblock block
                  Action
                result state:
                 continue->target->seqblock2
                 break->target->seqblock3
                 business logic CO
    seqblock2
                            Action1
                            Action3
    seqblock3
                              Action1
                              Action2
                              Action3
    i designed the workflow like this
    but the problem is that during runtime its directly jumping to seqblock3 with out asking the input value for business callable object
    and its not exiting from that block3.its going like infinite  loop(action1->action2->action3->action1->action2->Action3)
    pls suggest me the way to achieve this task
    Thanks
    kiran
    Edited by: kiran_mareedu on Aug 26, 2009 3:48 AM

    Hi,
    I have the similar issue.
    In my case it is taking too much time for completion.
    It is a background step so it should execute automatically.
    I have also checked Queue's for this.
    But could not understand why it is taking soo much time?
    Regards,
    Pratik

  • Handling User Events in sub panel vis and main vis with same Event reference Number.

    Hi All, Iam trying to work to handle events in both subpanel vi and main vi.
    I have a main program, and 2 sub vi. I will load the sub VI in 2 sub panels in main vi. Each sub pael vi has controls on it.
    I have created 2 User events for 2 sub panels vi. One user event consits of a Cluster with 2 Booleans (x & Y) and Other User Event consists of cluster of 2 unsigned 8 Numbers (a & b). These are created and registered in the main Vi and event register refnum is passed to the subpanel vi from the main panel vi.
    I have Event structure in main panel and sub panel vis.
    In one sub panel vi, When the value of one boolean(i.e. X) in the clusters changes, the Events structure in sub panel vi should perform some operation in sub panel vi only. When the value of other boolean (i.e. Y) changes it should perform some operation in main vi. I will try to Generate user event with the x value and Y value changed based on the control clicks in the sub panel vi.
    The OTher panel vi should behave in the smae way when the a & b value changes.
    The "Generate User Event" is working fine some times and sometimes there in no event triggered in the sub panel vi or main vi.
    Please let me know what is the problem Ramesh.

    There is a lot of talking, but not much understanding.  It'd be better if you posted some example VI's of what you are trying to do so that the words will make sense.
    One thing I can tell you is that you don't want to have two event structures handle the same event reference number.  You want to have two event registrations with each one going to its own event structure.

  • 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

  • AE user event error

    Have an AE which has errors:
    Init - registers dynamic user events and Runs VI.
    Write - Attempts to generate user event to write data to VI which is running (Error 1)
    Close - Attempts to retrieve control value (safety cluster_out) from running VI and then close (abort).
    The VI gets to run but the generate user event produces an error.  I can't figure out why and I doubt this is the proper way to be doing this.

    Hi Battler,
    I see that you've created the user events, but registering them involes the Register for Events VI, which is located in the same palette. It looks like a property node but has a satellite icon in the heading. It's very possible I'm missing something. Could you post your main and subVIs so I can take a look at them?
    Pardon the messy snippet.
    I have another question, too. It looks like you're closing the reference to your subVI in the init frame. Is there a reason this needs to be done?
    Verne D. // LabVIEW & SignalExpress Product Support Engineer // National Instruments

  • VISA Wait on Event User Event

    I have a Producer/Consumer program that uses an Event Structure to handle the UI button presses.  I want to be able to use the VISA wait on Event to read characters from the RS232 port.  So in my Event Structure I created a case for dynamic user events.
    I also create a while loop that has the VISA Enable Event and VISA Wait on Event in it. I enabled the "Serial Character" event only.  When I get this event I use the Create User Event.VI and Register for Events to get a Event Refnum
    How do I get the Event Refnum from this loop into my Producer loop?
    Solved!
    Go to Solution.

    Paul_Knight_Lockheed_Martin wrote:
    Here is the code
    No, that is not the code. That is one subVI and a picture. Where are you waiting for the VISA events? Where are you generating your user event? Based on the picture you are calling the Initialize_Controller_Communication and remaing in that code until the Stop buuton is pressed. You will not start your event structure in the producer loop until this VI completes. So, if you are not hitting the stop button to complete your initializtion it is no wonder you are never seeing your event structure run.
    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

  • Making an array of different user events refnums?

    Hello all,
    I have a question about dynamic user events. I have 6 different users events which I create, and would like to put into an array. (Such that I can use them in a For loop laters, taking off one event per loop and assigning it to a control of a vi) So far I haven't found a way of doing that since if I just wire the user events refnums to an array I get broken wires. (Similarly if I wire them to a build cluster structure.)
    I think that you'll understand what I am trying to do if you look at my labview code in the attached vi.
    In the vi I create some user events, and then wire them to the control of two vi's which will communicate to each other using these events. In the code you will see 6 Invoke Node structures where I use the "Ctrl Val.set" to pass the events to the two vi's. Obviously this is the wrong why of doing things. Since if instead of having 6 events I had 100, then I would need to put 100 Invoke Node structures on the block diagram (making it very large compared to the size of my computer screen!). 
    So what I would like to do, is put the user events refnums into a array, then put the one Invoke node structure into a For loop, and index the array to assign the events to the vi's programmatically. 
    Is there anyway of doing this? Or is there an alternative (/ better way) to what I have done?
    (Baisically I have 2 vi's that run in parallel and communicate to each other using user events. I need to pass the events to both vi's, how do I do it in the minimum of mouse clicks, and minimum of screen space.)
    Thank you!
    Paul.
    Solved!
    Go to Solution.
    Attachments:
    CameraTempControllerRunner.vi ‏49 KB

    I haven't created any new messages since the forum changed over, so I'm not sure.  But check on the menu under Options on the upper right.  I think there is a way to undo your choice and put it on another.
    Kudo's have replaced the stars.  Anything that was 4 or 5 stars is now equivalent to a Kudo.  But with the old system, anything less than 5 stars was essentially a negative opinion in the ratings.  So to simplify the multiple shades of gray (1 through 4 stars essentially being some degree of a negative) and to just eliminate the negative aspect altogether, the Kudo system was born.
    I don't know if the "Accepted Solution" designation does anything to help the person whose solution was accepted, but having that designation helps people searching the forum because they have the same problem find the answer quicker.
    Message Edited by Ravens Fan on 10-06-2008 10:15 AM

  • 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!

  • Diff betwn Substitution and Dynamic Variable

    Hi All,
    As I'm new in hyperion planning I'm not able to figure out the difference between Substitution and Dynamic user variable. does anyone have any explanation with an example.. :(

    Hi,
    Substitution variables act as global placeholders for information that changes regularly.
    Each variable has a value assigned to it that can be set and changed centrally on the Analytic Services server at any time. When you are creating a substitution variable it depends on the requirement that variable is going to used for all application and its database or for particulaer apllication and its databases.
    Substitution variables are especially useful when you are developing and reporting on rolling forecasts.
    You can also use substitution variable in web form , business rules.
    Substitution variable is created in Essbase but from 11.1.2.2 we can create substitution variable from workspace.
    There is nothing named as Dynamic User variable. If i am not wrong you are asking about user variable.
    User variables act as filters in data forms, enabling planners to focus only on the members they are interested in, such as departments in a particular division. Before you can associate a user variable with a data form, you must create the user variable.
    User variable can increase performance by helping planners focus on certain members.
    It is available in the File -> New -> User variable. It is also available in the Administration -> Manage -> User Variable.
    Hope this helps.
    Regards
    SST.....
    Edited by: ss1988 on Mar 1, 2013 2:14 AM
    Edited by: ss1988 on Mar 1, 2013 2:16 AM

Maybe you are looking for

  • Paid by Company CC receipts posted to FI

    Iu2019m trying to resolve the following issue.  Thank you for any advice or guidance you can provide. My company has been using Travel Management to process out of pocket receipts, reimbursed to the employee for quite a few years; we are now looking

  • Form Issue

    Try to launch any form on 11.5.9, always get APP-FND-01508: Failed to connect. Cause: Application Object library was unable to connect Oracle database.

  • ACE Chain Certificates in mobile devices

    Hi, I'm having an issue with intermediate certificates from GoDaddy when connecting from some browsers of mobile devices: Browser in Android 2.3.3; Safari in iOS 4.2.1; Chrome 18 in Android 4.0. In a PC there's no problem, only from the above mobile

  • [ADF BC] How to create an entity association to get one child

    I have two entities in a one-to-many relationship (say Employees and Employee_History). Each employee has one or more history entries. What I would like to do is have an Employee view that contains all the attributes from the Employee entity and also

  • Internal length ( dd03l-intlen ) of data element

    Hi Experts, I have created structure using data elements. intlen  updated in table dd03l is double than Whatever length I defined for data elements. e.g. I defined custom data element ZDEPOT  of domain type WERKS of type char 4. but it's length in ta