10 Second Hang on Application Close? Problem Solved
If your LabVIEW application hangs when you close it, it is very frustrating. No one wants to wait for their application to close. It is hard to debug because it often happens when most of the program has already closed out. What is even more frustrating is that your program doesn't hang every time.
If you have serial communication in your application. That may be the problem. If your application close/clean up VI calls VISA Close on a VISA reference that never made a connection, it will hang for a 10 second timeout.
If you have serial hardware, but you are running the application without a connection, then you will have this problem.
The good news is that you are in luck. The solution is quite simple - Check if the VISA Task wire is an empty string/path. If true, don't perform the VISA Close.