LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

event structure with events caused by the program

Good morning everybody,
 
I am looking for a simple way to handle events caused not by the user, but by the program itself. Is there a possibility to use the event structures with the types of events I just tried to describe or will I have to use case structures inside a while loop?
 
I'd be glad to hear about other possible approaches, too.
 
0 Kudos
Message 1 of 9
(3,510 Views)
Well... this is an easy answer, but what kind of events do you want to detect ? Depending on these events, the answer will be different.

You might also be interested by the example called "Dynamically register for events" (Helps >> Find Examples...)

Hope this helps 😉

We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 2 of 9
(3,503 Views)
Franzi,

as TiTou stated, you can have different types of events. From your description, i would think you are talking about programmatically generated events if you finished certain parts of your VI. TiTou already gave advice where to find good examples on this.
Another question i want to ask you is: Do you need the events to "trigger" some other part of code? If you answer YES, i would like you to take a look into your architecture. The reason for this advice is that you can often simply use synchronization-methods like queues or notifiers to solve this. "Examples" are included in LabVIEW within the template browser.
As an additional info: The types of events you can "catch" with the event-structure depends on the version of LabVIEW you are using. Example: with LV 8 you can catch some DAQmx-events.

Norbert B.
NI Germany

[Edit]: @ TiTou. i read your signature... have you already tested LV 8.20? i think it is very decent in comparison to 8.0 Smiley Wink

Message Edited by Norbert B on 08-31-2006 02:38 AM

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 3 of 9
(3,499 Views)
Hi Norbert,

As I said yesterday is this post I only used LV 8.0.1 a couple of times for small things and haven't really done it in good conditions. I was bad tempered, under stress and instead of trying to get into the new LabVIEW style I just thought : "everything is different, that's just rubbish..."
This is, of course not the case, and I hope shortly I'll have time to really get into LV 8.20.

😉

BTW, is there any improvement regarding the Shared Variable Engine since 8.0.1 ??

We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 4 of 9
(3,492 Views)
My intention is to monitor a test stand. As soon as one of the analog inputs exceeds its allowed value (or one of the digital inputs gives the according signal) I want the hole test stand to stop. The solution that I came up with is to use a simple whle loop with Case structures inside. I was just wondering whether there is a simpler solution...
0 Kudos
Message 5 of 9
(3,488 Views)
TiTou,

i can only link you to another thread where it is said, that few issues regarding the shared variable engine have been solved in 8.20.... so i do not know if it has effects on your applications or not....

Norbert B.
NI Germany
Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 6 of 9
(3,481 Views)
Franzi,



@franzi wrote:
[...]. I was just wondering whether there is a simpler solution...



Simple is the key here. What is simple? A solution you can implement within few hours without any knowledge of LabVIEW? A solution which takes you several days even with excellent knowledge of LabVIEW, but gives you the advantage that you can modify/extend it very fast without affecting the former functionality?
In my opinion, you should evaluate between a good architecture, which lets you enter modifications very smoothly, and a fast developementtime for the main issue. Regarding the main-architecture, you should definetly take a look into the templates since you propebly get new ideas on how to solve your issue Smiley Wink

Norbert B.
NI Germany
Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 7 of 9
(3,477 Views)
sory Franzi to monopolize your thread for another discution Smiley Sad...

Norbert,

Thanks for this link, I will definitly plan some new test of the shared variable engine in the coming weeks (or months), anyway by the end of the year I hope I'll develop more than 50% of my apps in LV 8.20 😉

Best regards.


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 8 of 9
(3,468 Views)

I got your point, Norbert Smiley Wink . My problem is that I always try to find the perfect solution, which sometimes makes me get lost in details. Well, I think I'll be fine with the links, which you and TiTou sent me.

Thank you both.

0 Kudos
Message 9 of 9
(3,466 Views)