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.
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.