01-27-2023 09:47 AM
Hello,
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.
01-27-2023 10:13 AM - edited 01-27-2023 10:16 AM
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.
Maybe take a step back and explain what the user should see, how he interacts, and what should happen.
01-27-2023 10:15 AM
Apologies. The correct Vi is attached below.
01-27-2023 10:19 AM
@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 2.vi, untitled 2 (1).vi, etc.) and we can no longer tell what's what.
Also give your programs a unique name. "Untitled 2.vi" is NOT a reasonable name!
01-27-2023 10:29 AM
@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!