Showing results for 
Search instead for 
Did you mean: 

Linking my Login button to my second tab and linking my start button to start program



I am currently trying to figure out how I would link my login button to move me to the User Application tab. This means that when I enter the username and MO i would like that the login button takes me to the next tab. 


I am also trying to use my start button as well but cant seem to get that to work. 

0 Kudos
Message 1 of 5

Can you please attach the correct VI? For example, there is no "tab" anywhere. There is no "start" button either.


Looking at the current code, I would recommend to start with a few basic LabVIEW tutorials, especially about dataflow. Your architecture is very convoluted. I recommend a simple state machine instead.


  • Your OK button does nothing
  • You user/password values are not used anywhere
  • Your event structure can only fire once, because the outer loop can only go to the next iteration if the inner loop has completed.
  • Pressing any of the event triggers while the lower loop is still running will lock up the code forever.
  • Your timeout case neve happens, because the default timeout is infinite (-1).

Maybe take a step back and explain what the user should see, how he interacts, and what should happen.

0 Kudos
Message 2 of 5

Apologies. The correct Vi is attached below.

0 Kudos
Message 3 of 5

@ikw123 wrote:

Apologies. The correct Vi is attached below.

Please don't give two different attachment the same file name! Now our downloads folder has a series of files (untitled, untitled 2 (1).vi, etc.) and we can no longer tell what's what.

Also give your programs a unique name. "Untitled" is NOT a reasonable name!

0 Kudos
Message 4 of 5

@ikw123 wrote:

Apologies. The correct Vi is attached below.

All the same problems already mentioned still exist!


When the program starts, the outer loop starts the first iteration and runs three independent code "islands" in parallel. All controls (visa resource, max output, launch 2, path2 get read and the inner loop starts. The event structure will wait forever for the login or close button to trigger. Any new values for max voltage, launch2, path 2, etc. will only get read at the next iteration of the outer loop, which can only happen if the an event fires AND the inner loop completes. If you would trigger the event twice before the inner loop starts, the program will lock up forever because the event locks the panel until the event completes, but the event cannot complete because the inner loop prevents going to the second iteration.


If the tab should not be operated by the user, you can make it an indicator and write the desired value to it depending on program state. If you also want to controllable by the user, switch it vial a local variable. Still, this is NOT your problem. You need to completely rearchitect the entire code first. Think state machine!

0 Kudos
Message 5 of 5