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-16-2021 09:57 PM
Because my MainVi takes around 10 seconds to load,
What I want:
A splash screen that basically loads for 10 seconds while the main vi is loading in the background. After 10 seconds the splash screen goes invisible and shows the MainVi. When the MainVi is closed with FP.Close, the whole program exits.
What I currently get:
Right now it shows up the windows for both subvi and Loading screen stacked ontop of each other. Loading screen runs for 10 seconds, then runs straight to the FP.close case structure instead of staying invisible as the MainVi is still running and has not been clicked by user to quit yet.
1) How do I make it so that the user cannot see another window/vi is loading in the background.
2) The loading screen vi seems to go straight to close without waiting for MainVi to exit first.
3) When I click exit that calls FP.Close on the MainVi, it doesnt seem to fully close everything, as closing Labview development software it would still show a warning saying
08-16-2021 10:14 PM
Found this technique in TS custom user interface,
You can find this under "C:\Program Files\National Instruments\TestStand 2019\UserInterfaces\Full-Featured\LabVIEW\Source Code"
Update path with actual TS version.
08-17-2021 12:57 AM
I don't have TestStand, and downloading from the site I got TestStand 2020 and couldnt find the example you linked.
I updated the block diagram to
Where I pass in the loadingScreen vi reference to the MainVi and allow it to call FP.Close on it instead.
With the changes it all seems to work perfectly until when I package into an executable, the loading screen shows up runs 10 seconds and nothing, the MainVi never shows up anymore.
Not sure why packaging into executable breaks it.
08-17-2021 02:26 AM
Ah nvm above, the executable build was renaming my MainVi, so that was why.
One last thing is, the loading splash screen exits properly, but the MainVi doesn't. It calls FP.Close but when it closes, it pops up the labview window of that Vi with the menu, run, stop buttons as if developing.
08-17-2021 07:09 AM
If you don't use VI-Server, but instead make the Splash-VI a SubVI, you don't have any difficulties with path names. And for me it always worked very well to use events to control the behaviour of windows.
See the attached example.
08-17-2021 11:11 PM
I implemented the subvi method into my main vi, and the splash screen appears and waits correctly. (count is just for a loading slider)
There is another flat sequence that does the mainvi initializing/populating the ui.
However, eventhough both flat sequence is running; now like before when i click the executable, it would display the icon as running in taskbar but still takes ~10 seconds before opening the vi which now loads the splash screen and waits another 10 seconds, which sorta defeats the purpose of a splash screen.
I'm not sure if it's because opening my mainvi takes 10 seconds, or if its just opening the labview runtime environmen that's stalling.
08-18-2021 02:52 AM - edited 08-18-2021 02:55 AM
Hello Ricky,
I suppose the latter.
I've never done this, but I suppose you have to load your main-VI via VI-Server. So the VI shown in your BD above can be seen as a launcher, executing the code before the sequence and the first frame, then calling your actual MainVI via VI-Server in the second frame. Feeding the event-refnum into your MainVI allows you to close the Splash-Win not regarding to a fixed time but depending on the state of the MainVI.
P.S. Thinking over it, so the launcher-VI turns into being the Splash-Win 😁