LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Event structure - "first run"

Dears all,
how can I manage the "first time" of an event structure?
See the VIs enclosed.

Thanks a lot at all.
0 Kudos
Message 1 of 7
(3,942 Views)
I've come up with a way to have a First Run event. There's an example posted on the LAVA forum at the link below. It uses dynamic events, I've only run it LabVIEW 7.1, but it should work in 7.0 as well.

http://forums.lavausergroup.org/index.php?showtopic=583&view=findpost&p=1602

Ed


Ed Dickens - Certified LabVIEW Architect - DISTek Integration, Inc. - NI Certified Alliance Partner
Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
0 Kudos
Message 2 of 7
(3,935 Views)
Thanks a lot for your help.
I try to dowload the example "First_Run_and_Error_Event.llb" of LAVA Forums but all my attempt failed.
Can you send me the above mentioned example ?

Thanks in advance

Lupe
0 Kudos
Message 3 of 7
(3,929 Views)
You have to be a registered member of the Lava Forum to download...
There a link to register at the top of just about any page.
0 Kudos
Message 4 of 7
(3,917 Views)
I've done.
Thank you again.
0 Kudos
Message 5 of 7
(3,914 Views)
You don't need to mess with dynamic events. Simply add a timeout event to the event case you want to trigger.
Feed the timeout terminal from a shift register initialized with zero and wired a -1 to the shift register on the right.

The event case will immediately trigger once due to timeout. After that, the timeout will be infinite.
(See attached image)

Also have a look at my old post. The need for a generic "initialize event" has been discussed long ago in more detail, but I can no longer find the thread.
Message 6 of 7
(3,893 Views)
That was actually my first idea for a "First Run" event. If you look at my original post in the LAVA thread linked above, that was just what I did, except I used the iteration count from the While loop to trigger a zero into the Timeout terminal.

The reason I ended up with dynamic events is I ended up needing the Timeout case for something else, and liked this solution better than a Case structure in the Timeout event to select which code to run. I've also now added an Exit event.

Ed

Message Edited by Ed Dickens on 02-28-2005 10:10 AM



Ed Dickens - Certified LabVIEW Architect - DISTek Integration, Inc. - NI Certified Alliance Partner
Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
0 Kudos
Message 7 of 7
(3,847 Views)