09-17-2007 05:00 AM
09-17-2007 05:23 AM
Hello,
yes, the literature is quite thin. 😉
http://forums.ni.com/ni/board/message?board.id=170&message.id=241479
http://forums.ni.com/ni/board/message?board.id=170&message.id=267372
http://forums.ni.com/ni/board/message?board.id=170&message.id=270599
http://forums.ni.com/ni/board/message?board.id=170&message.id=272088
09-17-2007 05:29 AM
09-17-2007 05:35 AM
Hi Bilal,
Try out a search yourself for "Event Sructures" or "Event-driven Programming" in these forums, you ll get a lot of materials.
Please ignore the previous links as they re in no way connected to what you ve asked.
Read the "Caveats and Recommendations when Using Events in LabVIEW" from the online help before you start programming using ES.
09-17-2007 06:15 AM
Hello,
yes, the examples are not good ones! But with my search for a "good example" I finally stopped with the insite of André:
http://forums.ni.com/ni/board/message?board.id=170&message.id=267372
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é
So it really depends on you, if the links from above help you or only cause chaos.
But your mentioning of C++ and VB lets me think, that your are a VC++ programmer like me. So I thought that the links might be difficult but also helpful later on.
09-17-2007 06:43 AM
Martin,
I didnt mean to criticise you, nor trying to imply that the event-driven programming has enough online help.
What I meant was to search in the name of Event-driven Programming or Event-driven Architecture in these forums.
Instead, it seems to me, you ve not been trying to hit the bulls eye in terms of the searching criteria.
What you both can do is open a blank VI & place an ES in it. Then open the online help & read more...
09-17-2007 06:55 AM
09-17-2007 07:09 AM
So my guess was right. 🙂
The online help of the event handling structure is good enough, the labview\examples\general\dynamicevents.lib example is already a little bit slim.
One has to understand, that a suitable refnum control must be created with clicking on the "Regsiter For Events" etc. But very often the refnum is "bad" but no indicated as such. So complete rewiring and restarting LabVIEW afresh suddenly made this structures with their code coming to live.
And while the Buttontest examples show, that events can be shared across three layers, in our real application not everybody sees al events! All of this costs considerable time.
09-17-2007
07:43 AM
- last edited on
06-11-2025
10:48 AM
by
Content Cleaner
Since this is not the first and only thread about events in LabVIEW, i want to take a few minutes to post here....
First of all, most mistakes made with event structures in LabVIEW are created because the user does not take care about the caveates of the event structure.
Second, most LabVIEW-users do not follow the dataflow-paradigm in LabVIEW. Regardless of event structures, LVOOP or other fine features added in the last years, LabVIEW is a programming language of "Dataflow Programming". LabVIEW will punish everyone, who forgets this, in a very "LabVIEWish way". Most often: LV does something the user does not intent.
Third, most LabVIEW-users do not have knowledge about timing issues nor race conditions (often created by timing issues, but not all!!!). That issues can also occur with events, so you have take care about them BEFORE you implement your more or less huge application (hopefully modularized in a good way!).
Regarding the examples/helpfiles: LV supplies you with a quite good online help and examples for the basics of the event structure. Additionally, there are some good examples online.
Nevertheless, if someone understood the basics within the examples, he can implement all usecases of event structure he needs on his own. Since the usecases are so diverse, it is nearly impossible to supply them all as example. And, to add this one: Where would be the fun of programming if i only had to put examples together in the right order?
Norbert
[Edit]: Reworked layout
Message Edited by Norbert B on 09-17-2007 07:43 AM
09-19-2007 08:59 AM