LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Event Driven Programming

Hi,
I am new to LabView. I have gone through basics of the Labview but facing some problems in the Event Driven Programming. The user manual of the Labview is not good. Anyone knows a good tutorial/manual of event driven programming (with examples) please do help me.

Regards,
Bilal
0 Kudos
Message 1 of 13
(4,493 Views)
Thanks,

I have saved the examples and will test them to get better concepts of Events ....
actually they are different from normal GUI programming of C++ but I heard that they are more close to VB because VB itself is event driven.
0 Kudos
Message 3 of 13
(4,481 Views)

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.

- Partha ( CLD until Oct 2027 🙂 )
Message 4 of 13
(4,479 Views)

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.

Message 5 of 13
(4,467 Views)

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...

- Partha ( CLD until Oct 2027 🙂 )
0 Kudos
Message 6 of 13
(4,454 Views)
Yes I am a VC++ programmer and has also worked on qt in linux but this Labview is a new stuff for me to learn. So far during the last 7 days since I have started working on Labview I have made significant progress in learning the basics but events has confused me a lot may be because of insufficient help.
0 Kudos
Message 7 of 13
(4,451 Views)

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.

0 Kudos
Message 8 of 13
(4,448 Views)

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

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 9 of 13
(4,439 Views)
I am using 7.1 version and these examples work with version 8.2. I am getting an error while loading the vi files.

0 Kudos
Message 10 of 13
(4,362 Views)