LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Running VI for set time?

Hi, I'm using a Labview program that is taking in user data and activating a  second vi if certain conditions of user data are met. My problem is that I cant figure out how to keep the program running once these conditions are met. The goal is to have the prgram activate the vi if the input meets the requirements, and then keep the second vi running for about 4 seconds, and then shut off the second vi, but allow it to be activated again if the conditions are met a second time. Is there a way to do this?

"There will be water if God wills it"
0 Kudos
Message 1 of 3
(2,023 Views)

Have you tried using the Elapsed Time express VI? Have a look at it and try to integrate that in your application.

Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 2 of 3
(2,010 Views)

I would recommend first that you look at using a state machine. A state machine will allow you to control this type of activity. There are many options for controlling the second VI. You can communicate to it using queues, notifiers or user events. Any of these will allow you to give it actions to perform such as start and stop. In fact, your second VI could be running all the time and simply be activated by your controlling VI wheneve necessary.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 3 of 3
(2,000 Views)