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!  

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.

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

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

  • Event Handling in labview with arrays as event data

    Hey folks,
    I have a Labview Application which uses a dll to read Ethernet data. The setup is such that, when the dll has fresh data it sends out an event to the Labview Application so that the fresh data can be displayed.
    However i have only managed to get this event based mechanism to send out a single structure at a time. Hence if there are 10 fresh data values, i need to send out 10 events (each event structure contains the parameter name, parameter value, unit and time stamp). It would be more efficient to send out an array of structures in a sigle shot.
    I have tried this but Labview keeps crashing saying that an error was encountered and Labview needs to close along with an access violation message. I did a lot of online searching and found some LV code for event handling but not come accross any implementation which uses arrays as evend data. Is this supoorted? And if so is there any example vi that can be shared so that i get some knowledge about this.
    Many Thanks in adavance,
    Abel. 

    I also gave a try by using a variant as the event data type instead of the cluster which contains the array of floats. I converted the cluster into a variant and used that to create the user event reference. Followed the same logic while decoding the dats.
    But still the crash.... Here is the windbg output...
    ModLoad: 07580000 075b7000 C:\Program Files\National Instruments\LabVIEW 2012\resource\lvalarms.dll
    ModLoad: 0ca90000 0cb72000 C:\Program Files\National Instruments\LabVIEW 2012\resource\mesa.dll
    ModLoad: 0c7f0000 0c7f9000 C:\Program Files\National Instruments\LabVIEW 2012\resource\lvuste.dll
    ModLoad: 35000000 3509b000 C:\Program Files\National Instruments\Shared\TDMS\tdms.dll
    ModLoad: 0c860000 0c87c000 D:\SapphireViewer\dll\SapphireClientDll.dll
    ModLoad: 0e240000 0e2c7000 C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.6195_x-ww_44262b86\MSVCP80.dll
    ModLoad: 0e2d0000 0e36b000 C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.6195_x-ww_44262b86\MSVCR80.dll
    (1cb0.1a34): Access violation - code c0000005 (first chance)
    First chance exceptions are reported before any exception handling.
    This exception may be expected and handled.
    eax=0e47f8b4 ebx=051f0040 ecx=051f0040 edx=061e5764 esi=22820840 edi=07b10040
    eip=03c2050c esp=0e47f5cc ebp=0e47f810 iopl=0 nv up ei pl nz na po nc
    cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00010202
    *** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\Program Files\National Instruments\LabVIEW 2012\resource\tdcore_12_0.dll -
    tdcore_12_0!LvVariant:etContents+0xac:
    03c2050c 837e3100 cmp dword ptr [esi+31h],0 ds:0023:22820871=????????
    I cannot really tell whats going on. Looking for some pointers.
    Regards,
    Abel.

  • Starting/Stopping a polling loop with a user event.

    I keep reading on this forum that placing a loop inside a user event structure is a bad idea because it disables other user events from triggering.  However, it seems like a good idea to be able to start and stop a loop from a user event (like a button being pressed or de-pressed) and it seems like a good idea to not have the loop waist CPU resources while it does not need to be running.
    So what are the solutions to this?  Is a notification the best approach?
    Attached is my solution.  Is there a more graceful approach to this problem?
    Aside: Why are boolean controls that are of the "Latched" mechanical action always pressed in after their event fires?  For instance, the stop button on the attached VI?  Shouldn't it be depressed after the user clicks on it because it is "Latch when released?"  I've always wired "false" constants to 'variables' of these controls after the event structure fires, but do not find this approach very graceful.
    -Nickerbocker
    LV 8.5
    Attachments:
    Wait for Notification for Polling Loop Test.vi ‏25 KB
    wait for notification for polling loop test.jpg ‏61 KB

    Nickerbocker wrote:
    If an error is generated on the first itteration, then the loop is terminated with that error line.  Right?
    Wrong! The loop cannot terminate until everything in it has terminated. RIght now it will stall at the event structure no matter what until an event occurs. At this time it is sufficient to get the error piped through the event structure. If you are worried about an error in creating the notifier (anything that happens before the loop starts), you shold place your entire later code inside a case structure wired to the error so the loops don't even start.
    Nickerbocker wrote:
    Can multiple event structures exist in the same block diagram?  For some reason I was under the impression that there could only be one event structure that fires at one time.  If that structure was in execution then no other Event Structures could fire....  if my information is wrong, then I like your solution.  If it is right, then I don't like your solution .
    Your information is wrong again. You can have as many event structures as you want, and all is well as long as all event structures can execute in parallel. So make sure they are in independent loops.
    (If you would place two event structures in the same loop, both must trigger for the loop to complete the iteration, probably something that does not make a lot of sense. So don't do that!).
    LabVIEW Champion . Do more with less code and in less time .

  • 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

  • Need help with basic user events in Queued state machine example

    I have written a little queued state machine example to try to teach myself about creating and using user events.  The objective of the machine is to periodically choose a number (I'm doing it now with a control instead of a random number generator for troubleshooting), and compare that number with the number I have set in a control.  When they match, I want to cause an event to fire so I can do something about having found a match.  The examples in the LV Help file references show the events within the event structure, but I want to reach out of a state and cause an event ....
    Can someone point me in the right direction here?
    Thanks
    Hummer1
    Solved!
    Go to Solution.
    Attachments:
    User Event Generator Example01 snip.png ‏102 KB

    Yep....That was it...I had tried to do that but got fouled up with the variant definition...so defined the user event using a boolian and did the same in the case structure where I wanted to create the event and it worked great...
    Thanks.
    Here is the final version...not bulletproof, but does have a queued state machine using a user event to cause an event to fire.
    Hope you find it useful.
    Hummer1
    Attachments:
    User Event Generator Example01.vi ‏45 KB
    Operating States Enum Example01.ctl ‏5 KB

  • How to use postlv user event in labview

    Hi sir 
     I am sending data labwindow cvi dll call to labview,for that we need postlv user event.please any one knows to use postlv user evenet in labview.
    Below will  be the  structureand i need to update in labview .
    typedef struct
    unsigned
    uDSPIO,
    // uDAQMode,
    // bControllerActive,
    bShutDown,
    bPowerOn,
    bPowerHi,
    bPowerFault,
    bSGIdle,
    bSGHold,
    uBitsIn,
    uBitsOut,
    uCycleCount,
    uCycResidue,
    uBlockCount,
    uLogChannels,
    uCurrentMode,
    uAsigndPhysCh[LOG_CHANNELS];
    float
    fSetPoint,
    fDAQRate,
    fRange[LOG_CHANNELS],
    fReadout[LOG_CHANNELS],
    fMax[LOG_CHANNELS],
    fMin[LOG_CHANNELS];
    char
    sChID[LOG_CHANNELS][32],
    sChUnits[LOG_CHANNELS][16];
    CTRL_CHANNEL_STATUS;
    Attachments:
    GDSCallback.vi ‏12 KB

    AThe fixed size arrays in your structure are inlined byt the C compiler. This means they are not an array pointer (and definitely never a LabVIEW array handle) but rather LOG_CHANNELS amount of unsigned ints and floats directly embedded in the structure. In LabVIEW terms this is most easily represented as a cluster with LOG_CHANNELS elements inside the main cluster.
    So basically your uAsigndPhysCh needs to be a cluster with LOG_CHANNELS elements of unsigned ints and  fRange,  fReadout, fMax and fin are clusters with LOG_CHANNELS single precision float values, and then sChID is a cluster with 32 * LOG_CHANNELS chars and sChUnits one with 16 * LOG_CHANNELS chars.
    However I would personally rethink this strategy. This huge cluster monster is passed into PostLVUserEvent() each time and copied into the event data on every event, causing quite a bit of overhead that way. Is it really necessary to post all this data every time?
    Also you have commented out uDAQMode and bControllerActive in your C structure but included it in the LabVIEW cluster which will certainly throw off your data. Last but not least the b prefix would probably indicate that you are only using that element as a boolean value, so why not consider to use bit fields there? In LabVIEW you can easily seperate those bitfields by either translating the resulting uInt32 into a boolean array or even more efficiently use boolean logic to detect the bits.
    And in order to let LabVIEW react on a user event you have to create that user event with the correct datatype (your cluster monster) and then pass the user event refnum to your DLL. This DLL then calls PostLVUserEvent() with the user event refnum as first parameter and a pointer to a data structure that matches the LabVIEW user event datatype EXACTLY whenever it wants to post an event to LabVIEW. The user event is also registered in an event structure in LabVIEW which will then get triggered everytime your DLL posts an event by correctly calling PostLVUserEvent().
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Trigger event with user event

    Hello,
    I'm trying to trigger my event structure with an user event when my signal reaches a certain value.
    the ultimate goal will be to send a message trough queue to my consumer. for now I'm just trying to prove functionality.
    currently the event is always triggered once it's set of once and it wont stop.
    Here is what it looks like.
    thanks in advance
    Attachments:
    labview help.png ‏206 KB
    Trigger Send alarm practice-ev.vi ‏75 KB
    user_event_trig2.vi ‏13 KB

    Erik08085 wrote:
    Hello,
    I'm trying to trigger my event structure with an user event when my signal reaches a certain value.
    the ultimate goal will be to send a message trough queue to my consumer. for now I'm just trying to prove functionality.
    currently the event is always triggered once it's set of once and it wont stop.
    Here is what it looks like.
    thanks in advance
    i think a boolean crossing pt by pt with direction set to false-true, that will take care if your value swings in and out of your ranges 
    as mentioned, put the event structure in it's own loop....no point in having a timeout with an empty case

  • User Event Case getting tied up for long duration in LV 2009 (with SP1)?

    Quick question here...is there any decent reason the user event case is getting tied up for long durations in LV 2009.SP1?  In 8.5 I never had an issue with my code doing this, though when converting to 2009.SP1 I am running into huge lock-up issues with the user event case.

    I have not seen aby issues...
    You are saying that the code from LV8.5 (unmodified) behaves differently in LV2009 SP1?
    Can you post your code?

  • 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

  • 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

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

  • 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

Maybe you are looking for