LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Single startup action

I have a problem with the startup of a system.
 
When a sensor [1,0] gives a high [1] signal, the main program should start, but when the sensor gives a low [0] signal I need to start for once another program, until the sensor gives a high [1] signal. Then the main program should start.
0 Kudos
Message 1 of 2
(2,434 Views)
It kind of depends on how your main and second program are written. Do one or both have a while loop that has to be stopped with a user action or do you run them once and return? If the purpose of the second program is to cause the sensor to change with no user interaction, all you need for a startup program with a sensor read and a case statement. Inside the two different cases is calls to the different VIs. You can also start the second program dynamically by using a Run VI method and setting Wait Until Done to false so that the startup program continues to check the status. When the status changes, you could stop the second VI with other VI Server properties and methods.
Message 2 of 2
(2,415 Views)