04-19-2013 03:17 PM
Hello all,
I am trying to create a labview program that runs a test and when completed, asks the user if they would like to run another test. Essentially I have a sub-vi that runs the test and is placed within a while loop where when the user says they want to run another test, the loop just continues and runs the sub-vi again. However, I am running into the problem where my sub-vi is not reinitializing to default settings. I have coded the sub-vi itself to initially reinitialize all values to default, however this does not seem to work.
Any help would be greatly appreciated!
-Derek Spivey
04-19-2013 03:36 PM
It would help if you show your code.
How do you reinitialize in the subVI? How do you call the subVI again when the user wants to run another test? There are multiple ways of doing these things and some may be more effective than others.
Lynn
04-19-2013 03:36 PM
@djspivey wrote:
Hello all,
I am trying to create a labview program that runs a test and when completed, asks the user if they would like to run another test. Essentially I have a sub-vi that runs the test and is placed within a while loop where when the user says they want to run another test, the loop just continues and runs the sub-vi again. However, I am running into the problem where my sub-vi is not reinitializing to default settings. I have coded the sub-vi itself to initially reinitialize all values to default, however this does not seem to work.
Any help would be greatly appreciated!
-Derek Spivey
yes, make a case statement.."initialize" with your values or property node.
04-19-2013 03:42 PM
If you still have questions, please show us some code.
04-19-2013 03:48 PM
Thanks for the reply, johnsold!
I have attached an image of the code that I am referring to. Pretty much, I'm trying to reinitialize the sub-vi "Smart Hound-T." As you can see in the code, a user is asked if they want to run another test after the sub-vi has completed its run. Located within the sub-vi, I reset the values back to default by placing a property node inside the first frame of a stacked sequence frame and have it connected to a VI Server Reference called, "This VI." This seems to work perfectly fine when running the sub-vi by itself, but for some reason when I run it by calling from a main program, the sub-vi immediately tells me that the test is over. Which is not correct because the test is supposed to run anywhere from 5 to 20 seconds.
-Derek Spivey
04-19-2013 03:53 PM - edited 04-19-2013 03:54 PM
Please show us more code! Your picture makes very little sense. Can you show the code of the subVI? Maybe there is a race condition somewhere.
(... and while you are at it, eliminate that stacked sequence! 🐵