05-15-2009 07:33 AM
Whilst trying to open a RS232 COM port in my application, I get the message 'cannot open port'. This is because another application in Windows has already opened the same port, crashed and failed to close the port. I realise I cannot open the port if another program has already failed to close it.
My question is: is there a way of closing a COM port that is already open (thinks its open) in another Windows application? Is there a low level command perhaps that I could send to force the COM port to close or at least think it was closed so that I could then open it in my application?
05-18-2009 05:22 AM
Hi Steve,
You wont be able to use LabVIEW to close the COMM port after it's been opened by another application. LabVIEW will need to generate a handle to the port which it wont be able to do when it's still open. You may be able to close the port in Windows manually but my initial research did not yield any definative results.
I would be interested to hear your eventual solution.
Regards,
Tom Clark
06-12-2020 12:22 AM
sir i m using topcon total station old model 235n while using the machine uploding data i recieve the message can not open COM port .Port is already open by another programme.
06-12-2020 05:11 AM
@syed1979 wrote:
Port is already open by another programme.
That's your problem. A serial port can only be opened by one application at a time.