LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

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.
0 Kudos
Message 1 of 8
(5,301 Views)
If you have LV 7.0 or higher, you can use the Value(signaling) event.  When using Value(signaling), you can programatically wire a new value into the control or indicator and it will cause an event just as if the user manually clicked on the control.
- tbob

Inventor of the WORM Global
0 Kudos
Message 2 of 8
(5,298 Views)
Hi,

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?

Thanks,

ToNi.

0 Kudos
Message 3 of 8
(5,295 Views)
Try using the filter event (the one with the question mark next to it).  They allow you to determine what LabVIEW does when an event is triggered, before it does anything.  So, you could make it such that no change is registered in the control itself, but you still know that the event has been triggered.

And does the button need to be visible to the user?

Message Edited by Novatron on 08-03-2005 01:16 PM

0 Kudos
Message 4 of 8
(5,289 Views)
> Try using the filter event (the one with the question mark next to it).

Where is it? filter event? How can I do it?

Yes, I want to
make it such that no change is registered in the control itself, but I know that the event has been triggered and then I want to go inside the event case (I want to capture this event and do something for it) but transparent to the user.

> And does the button need to be visible to the user?

Yes.... It must be visible to the user because it happens on the same vi. Initially the user press a button and then it goes inside an event case with the event Double Click and there, I do some things, and finally, inside this event, at the end I force the event I would like to be transparent to the user. When I force this event from inside the current event case I want to capture the event I have just forced now (simulate that the user has pressed the button).

Thanks,

ToNi.

0 Kudos
Message 5 of 8
(5,274 Views)
Filter events are part of your everyday event structure, they just have a red arrow instead of green, and have a question mark next to it.

For example, under "Application" the events listed are:

->Application Exit
->Application Exit?
->Timeout

The middle one with the red arrow and the question mark is the filter event.  I've never used them myself, but I know you can control how LabVIEW handles the event.  You should look up "Filter Events" in the help for more info.
Message 6 of 8
(5,267 Views)
You can also create a dynamic event, register it, place the event code in the event structure and then call this defined event from the button event.  You can then programatically call the event with a generate event vi anywhere transparently from the user.  I have user this architecture to decouple an event from a specific action with much success in the past.  It is another option if you prefer not using the value(signaling) property.  Don't know it there are any performance hits or advantages but it is a clean and extensible solution since you can link to your dynamic event from any other event or condition in the code.  It also allows for dynamic unregistered to block the button event from causing the action to continue (ie additional fault tolerances in the program with little code overhead.  Hope this helps.
 
Paul
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 7 of 8
(5,254 Views)


@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!
0 Kudos
Message 8 of 8
(5,247 Views)