LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Fire non-user defined event inside another event

I want to call a normal/non-user defined event after an operation has occured inside a different normal/non-user definded event. Is this possible?

The reason I don't want to use a user defined event is that if this can be done this way it would be much cleaner implemenation. Also, cleaner than using a sub-vi which would require a lot of wiring.
0 Kudos
Message 1 of 7
(3,108 Views)
hi

you can nest event structures. remember to disable the frontpanel locking for the outer event structure. see also the attachment.

best regards
chris
Best regards
chris

CL(A)Dly bending G-Force with LabVIEW

famous last words: "oh my god, it is full of stars!"
Message 2 of 7
(3,108 Views)
Thanks for the reply and example, but I don't think it is what I need. let me try to clarify; is it possible to execute an event inside of an event structure programically? ie: emulate a user clicking on a button.

I don't need to wait for events, but want to execute one.

thanks
0 Kudos
Message 3 of 7
(3,108 Views)
ah, now i got you!

you want to RAISE an event. ok, that's different. in case of just a simple control (any type) you can write the desired value to the "val(signaling)" property of the control. this changes the value AND raises the "value changed" event, just like the user pushed the button. then you can catch this event in the next turn of your loop. if you want to raise other events than just a changed value you might try to use the windows "SendInput" API. this emulates an user input via mouse or keyboard. search for "SendInput" in this forum or at www.MSDN.com, i've seen some postings about this theme.

best regards
chris
Best regards
chris

CL(A)Dly bending G-Force with LabVIEW

famous last words: "oh my god, it is full of stars!"
0 Kudos
Message 4 of 7
(3,108 Views)
perfect. just what I needed. Thanks!
0 Kudos
Message 5 of 7
(3,108 Views)
From my experimentation with this, it appears that the fired event
will not actually execute until the event currently being executed
(the one that fires the other event) is completely finished. The
"time" terminal of the second event idicates the time when it was told
to fire, but it does not actually execute then. You cannot say do
steps 1,2,3 in an event, temporarily leave that event to do code in
another event, then come back to the first event and complete steps
4,5. If the second event is fired after step #3, then steps 4 and 5
will finish first before the second event executes. This contrasts
with other languages such as Delphi were you can leave one event
temporarily.

On Mon, 25 Oct 2004 11:46:45 -0500 (CDT), chrisger o.email> wrote:

>simple control (any type) you can write the desired value to the
>"val(signaling)" property of the control. this changes the value AND
>raises the "value changed" event, just like the user pushed the
>button. then you can catch this event in the next turn of your loop.
0 Kudos
Message 6 of 7
(3,108 Views)
Its good to know how that functionality works. Otherwise it takes a lot of trial and error; especially if you are used to the functionality of another environment. Thanks for the heads up.
0 Kudos
Message 7 of 7
(3,108 Views)