I spent a little more time looking at your program. Several things could be changed to speed it up.
1. This is a big one: Move all the Create Channel and Start Task VIs outside the loop to the left. Move all the Clear Task and Error Handler VIs outside the loop to the right. It is not necessary to create and close the tasks on every iteration of the loop. It takes time and does not achieve anything useful.
2. The user login VI and subVI: Is it necessary to log in on each iteration of the main loop? Do these VIs have a timeout if the user does not respond? If not, this loop can wait forever to finish. It appears that the output from that loop is the same whether login was successful or not: so why login?
3. The loop with the SET button will also wait forever for the button to be pressed. Parallel loops without delays (Wait (ms) functions or equivalent) can hog CPU resources and do not act very "parallel."
4. The large nested case structures at the top:
A. The outer structure is selected by the state value =0. In the False case the next value is set to 1. The outer stucture could be removed and in case 0 of the inner structure the next value is set to 1. Be careful with the "Use default value if unwired" setting for output tunnels. If the default case does whatt you want this can be OK, but if you forget to wire a case it produces the default whether you want that or not. WIth as many cases as you have, I would feel safer with avoiding the "Use default value if unwired" setting because you get an error if any case is not wired.
B. In Cases 6, 10, 13, 13, 16, 21, and 24 the Create Channel .. Error functions should be moved outside the loop as in item 1 above.
C. How many times do the cases with delays execute? Four cases have .25 s delays, one has 0.5 s and one has 0.9 s. These are far shorter than your 20 minutes but if they execute often it could add up.
Hope these suggestions help.
Lynn