LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to include a time condition in a Vi?

Hi,
I need to run an event for one hour and after this time interval has elapsed, I need to stop this event (let�s call it event A) and go for event B. I have been trying to work with the Elapsed Time (LabView 7.0) sub-vi with no success. That sub-vi sounded perfect as I could even work with a boolean condition to trigger event B. Basically what I would like to know is how to generate a time condition in which I can input the time and after that time has elapsed I can generate an action to pass to another event? Would it be an simple way of doing so?
Thanks for the help.
Adriana
0 Kudos
Message 1 of 4
(2,794 Views)
I may be missing something here, but I think your problem is not the Elapsed Time VI, but the way your events are triggered/controled or chained. Or may be you just forgot to wrap the Elapsed time vi into a loop ?
See the attached example...
The "Run event A" sub.vi is intended to trigger event A. Something like commuting a switch or launching a dynamically loaded vi. It should not wait until event A finishes (of course...).
There are many possibilities... and I'm sure that you will get other solutions.
Keep wiring !
Chilly Charly    (aka CC)
Message 2 of 4
(2,794 Views)
Chilly Charly,
Thanks a lot for your reply and specially for the example. You were right - the way I was wraping the elapsed time into the loop was not the correct one. I am still a begginer at the LabView world so I don't have the complete "feeling" on it yet and I still make many mistakes. Anyway, with your example I have been already able to go further and built an extended vi that also work with that time structure you taught me.
Thanks a lot once again. Your help was very valuable 🙂
Adriana
0 Kudos
Message 3 of 4
(2,794 Views)
Many thanks for the feedback. That helps also in tunning the answers...

Keep wiring 🙂

CC
Chilly Charly    (aka CC)
0 Kudos
Message 4 of 4
(2,794 Views)