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.
12-12-2014 02:44 PM - edited 12-12-2014 02:47 PM
Hey guys.
I have some akward thing happening with my vi.
I have this game I've created, and it all runs inside a while loop that ends on a button click.
Anyway, I have made a propery node "FP.OPEN" and gave it a False constant so that whenever the while loop ends it will close the current VI (since this vi is basiclly a sub-vi getting called from another vi, and I dont want to see it anymore once I am finished with my code).
For some reason I saw the window instantly shuting down, so I decided to test it and replaced it with a msgbox instead.
To my surprise, the msgbox has instantly appeared (may i remind you, the msgbox is in the END of the code)
Could someone figure this out?
Thank you very much! 🙂
*a link to my VI for reference:
https://www.dropbox.com/s/n5k3faaf9vkb80i/Special.vi?dl=0
Solved! Go to Solution.
12-12-2014 02:51 PM
Most Likely you have the VI Properties for Windows Apperance left at the default for a "dialog"
You do not want that behvior so you need to change the vi properties to what you desire
I often just handle those pesky properties inside the vi explictly
12-12-2014 02:54 PM
Nope, I double checked that this is the same as my other sub-vi's which work perfectly.
Also, could you please explain what this code is doing?
12-12-2014 02:55 PM - edited 12-12-2014 03:00 PM
Your while loop is not inside the sequence structure, but floating over it (do a diagram cleanup to see). This means the the FP close happens as soon as the second frame is entered. (even if the while loop were part of the frame, the fp-close would run in parallel and still close down the FP immediately. You should at least place it in the last (now empty) frame.)
As an advice, please consider restructuring the program from scratch as a state machine. None of the local variables or sequence structures are needed. Once you consolidate all the duplicate code, the entire diagam would probably fit on a postcard.