LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Making an array of different user events refnums?

Solved!
Go to solution

just thought to attach the quick test program I made to varify I understood how to implement this method of making a generic user event refnum.

Maybe it is useful if you don't immediately understand whats going on.

 

hope its useful,

paul.

0 Kudos
Message 11 of 15
(773 Views)
You cold make it even more beautifull by wrapping the creation, sending and destruction in an action machine. A method to read the refnum is also very usefull. In that case you can maintain the event in a singel VI/location instead of everywhere that you need to send it and where like to handle it.
Regards,
André (CLA, CLED)
Message 12 of 15
(762 Views)

Yes great idea!

 

On similar lines, I could create an events class to wrap everything together. So the class would have a cluster with event enumerator, and variant data. Then create methods like addEventType, createEvent, sendEvent, receiveEvent, and a destructor, as you suggested for the action machine. 

 

These two ideas, a class or an action machine seem equivalent. I guess the difference is that in the class you can store all the events and methods together, but in the action machine you only temporarily store the data while you pass it around the different vi's that broadcast or listen to the user events.

 

But I am not used to using action machines, so its not clear to me when I should use one instead of making a labview class. 

 

Thanks for the suggestion!

Paul. 

0 Kudos
Message 13 of 15
(739 Views)
As I mentioned, you can search the LAVA forums for LVx, which does this with classes and should encapsulate everything.

___________________
Try to take over the world!
0 Kudos
Message 14 of 15
(729 Views)

Sorry I had overlooked your post, "LVx" (cool name) seems to be exactly what I am looking for! 

 

Information at:

http://forums.lavag.org/LVx-Exported-LV-Functionality-t9437.html 

 

Thanks for your tip!

Paul. 

0 Kudos
Message 15 of 15
(720 Views)