Jump to content

Sending A Timeout Event To Another Vi.


Recommended Posts

:question:

i am trying to find a way to send an event to another VI

especially a timeout event if possible, but an unused (in that case)

event like "keydown" would be fine

but am embarassed with this hassling registering procedure

and can't make it work

does someone could enlight me or send me a small example for it ?

Here is an image of an example that will pass an event to another VI when a timeout has occured. remember to right-click on the event structure and select Show Dynamic Event Terminals

Can anyone suggest a better approach to passing a timeout event to another VI? Please post any suggestions.

post-10-1073966676.gif?width=400

Link to comment

thanks for your answer but that's not exactly what i was searching for

your method allow to send a special event to another VI (vi-2)

but obliges you to share a reference to that event via a global variable

and to create this reference before VI-2 runs

that's why i would like to send a known event which wouldnt need to create a special event

and for exemple be able to simulate a timeout event in VI-2, ordered by VI-1

but i could replace the timeout event with a keydow event or whatever is not used in VI-2 and wouldn't interact with his functionalities.

the idea is to make know to VI-2 when n Vi's like VI-1 are closed by the user

but without needing to check constantly if n windows are opened and use the power of the event functionality which is more responsive and less time consuming

Link to comment
the idea is to make know to VI-2 when n Vi's like VI-1 are closed by the user

but without needing to check constantly if n windows are opened and use the power of the event functionality which is more responsive and less time consuming

I assume you have seen the NI example called: Dynamically Monitor VI's.vi. This will do what you ask. It is a combination of firing events and monitoring panel states. The entire process is very fast and efficient.

You can also investigate ActiveX events that implement VI callbacks. Look at this post for more details.:

http://forums.lavausergroup.org/index.php?showtopic=61

post-10-1074007359.gif?width=400

Link to comment
I assume you have seen the NI example called: Dynamically Monitor VI's.vi...

yes i did it before posting.

the thing is that the VI constantly check if all vi's in memory are running

and i was trying to avoid this with just sending an event (they should look at NI the way hypercard worked ...)

and for active x : no way, i am developping on a mac and just want to use cross platform tools !

Link to comment
yes i did it before posting.

the thing is that the VI constantly check if all vi's in memory are running

and i was trying to avoid this with just sending an event

:(

Yes, well you don't really have to do it the way they show. I mean you can also just respond to that event. You will have to get the references to those vi's that want to send an event then you can respond to a panel close or anything else.

The way the existing event system works in LabVIEW requires that there be an event case for the specific event you are responding to. You cannot dynamically register NEW events only re-assign existing registrations to other VI's or controls. Hopefully this may be added in future releases. ;)

post-10-1074101247.gif?width=400

Link to comment
you can also just respond to that event. You will have to get the references to those vi's that want to send an event then you can respond to a panel close or anything else.

the thing is that i don't want to respond to any event

i just want to send one

just like we do with "value (signaling)" event

in fact i am trying to send this event but tear my hairs off to figure out if it possible.

i can't find a way to create a reference to a button which belongs to a different vi

Link to comment
Here is one way to do it...

great great GREAT !

that's exactly it !

it does it perfectly

i just guess if it is really necessary to close the references

really a lot of thanks

it is a really elegant way to update an interface without consuming processing time with a permanent checking of globals

and by the way i think i understand better now how these references work

thanks a lot again

pascal

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.