03-11-2010 03:54 PM
03-11-2010 04:31 PM
As of that I know, if you do not stop and remove your program from memory (stopping all) you should always clear the reference to the com port.Always code that way. btw, exiting an exe closes the ref. (but you should still code the closure) (in windows). In dev. mode, do not abort execution, it does not remove the ref.I think its not possible to close a type of com reference under "abort execution", since youve lost your ref ID next time you want to run your app in dev. mode. I have not experienced this with VISA-COM, but with CAN-bus I have.Perhaps there is a programmatic fix, but still I think it is not the correct way to work.
but.. I did not really understand your powerloss.. than your computer&com port should go down too..?
References should always be stopped and closed. Some ref. types (f.ex. datasocket) if not closed and instead new ref is created over and over (and works), youll get a small memory leak that gets big after a while.
03-11-2010 04:45 PM