viSci Posted November 25, 2013 Report Share Posted November 25, 2013 I have an application that opens 8 RS232 com ports with VISA aliases. I am finding that under various circumstances the VISA references are not being closed (even though I am issuing a VISA close) The problem is that when I try to reopen the com ports some seem to be still open thus giving the error that the resource is valid, but VISA cannot currently access it. I have tried closing the com ports before opening and even querying the VISA driver to see which com ports it thinks are open and then trying to close those ports. But nothing seems to be fool proof. Was wondering if anyone has come up with a solution for this, thanks. Quote Link to comment
Yair Posted November 26, 2013 Report Share Posted November 26, 2013 One thing you could try is disabling and enabling the port, which often helps, but if I remember correctly, doing it programmatically is a problem, because you have to use a component which only comes with the Windows SDK, which you have to install separately. When dealing with this in the past, I think that after giving it a quick look, I decided to give up on it and just tell the users to do it manually (through the device manager) or restart when this happens (in my case I don't think this was caused by LV, but by something else which grabbed the port, although I have no idea what, because there shouldn't have been anything else there). Quote Link to comment
viSci Posted November 27, 2013 Author Report Share Posted November 27, 2013 Yair - thanks for the reply. For now I have removed all VISA aliases and have not had a problem since. 1 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.