Showing results for 
Search instead for 
Did you mean: 

VI file cannot be completely shut down!?

Hallo all experts,
My VI application is to communicate with an A/D converter. It only works properly one time after opening. I have to totally close LabVIEW, then start it again for a second run. When I run HyperTerminal after stop the application, windows says that another program is using the COM terminal. It seems that my VI application cannot be completely shut down, but Why? Is it normal? There is a producer-consumer structure inside my code, perhaps it is due to the bad synchronization of terminating them. Have you ever experienced such situation?
Any tips are highly appreciated.
0 Kudos
Message 1 of 5
If you are using VISA to communicate with COM port, you need use the VISA  to close the resource and release the port before you exit your vi. 
0 Kudos
Message 2 of 5
There could be a lot of causes.  Can you attach the VI so we can look at it and let you know what may be the issue?
0 Kudos
Message 3 of 5
I agree with Centerbolt that the best course of action is to manually close your VISA session in your LabVIEW VI before the VI shuts down. Another thing you can do is to set an Environment option in LabVIEW under Tools >> Options. You'll see a checkbox there called Automatically Close VISA Sessions that shuts down VISA sessions whenever the VI goes idle that was using it. Both these methods should save you from having to restart LabVIEW everytime.
Jarrod S.
National Instruments
0 Kudos
Message 4 of 5

When using VISA I usually precede the VISA Open with A VISA close and Error Clear,  This will handle the event of the resource was inproperly closed.  A very useful trick when debugging where you might often kill an application befor the Close statment is called.



Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
Message 5 of 5