From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
08-07-2018 09:05 AM
This code is part of a larger project, but presented here are the basics which aren't working in the larger project.
I have an Open button and a String entry box. Now, depending on whether you enter a '1' or '2A' into the string, that should activate the case structure in the code and from there an Invoke node opens a specific VI for either of the two string entry choices.
As far as I've seen this works the first time, whether I enter 1 or 2A first. But while the program is running the user should be able to enter in the other entry, press open, and again be able to Invoke open the second chosen VI. But that doesn't happen. The Open button just freezes in a TRUE dark grey position and a new String entry can't even be typed into the String Command.
Anyway, I've got the program attached here. If you want to run it, in the case statement first put in two new different file paths for the two invoke nodes of each case.
Solved! Go to Solution.
08-07-2018 09:17 AM - edited 08-07-2018 09:19 AM
Your Invoke Node to run the VI is set to "Wait Until Done". Turn on highlight execution and you'll see you your execution is waiting on that node for the subVI you just opened to finish.
You also have a race condition. Why are you using the local variable of Mode when the terminal is sitting in there unused? If you start the VI, Mode will be read with whatever value is there when you start. If change the value in mode, then hit open, it will use the old value. The Mode terminal and the entire case structure probably belongs in the event case, and wire a False to Wait Until Done.
08-07-2018 09:26 AM - edited 08-07-2018 09:27 AM
Hi.
I think the problem is in the invoke node 'Exec VI' with 'wait till done' on true. I turned in on 'false' and it works.
08-07-2018 09:39 AM
Hey! I did everything you suggested and it worked perfectly. Thanks!
08-07-2018 10:00 AM - edited 08-07-2018 10:01 AM
You should still clean up the issue with the local variable.
I would also use a ring control or an enum for selecting which to use. With a free from string control, what happens if someone mistypes the option?