Why am I unable to use my serial port after a hardware reset if the port was open in MATLAB?
I use USB-devices that create virtual serial ports in Windows, for instance COM5. When MATLAB opens a connection with one of these devices and the device disconnects and reconnects, I am unable to use the device any more. What can I do to regain access to the device?
ERROR: myComPort = serial(‘COM5’);fopen(myComPort);% now disconnect the device
% now connect the device again, the following will be unsuccessful:delete(myComPort)
clear myComPortmyComPort = serial(‘COM5’);fopen(myComPort);Error using serial/fopen (line 72)
Open failed: Port: COM5 is not available. Available ports: COM1, COM3.
Use INSTRFIND to determine if other instrument objects are connected to the requested device.I use USB-devices that create virtual serial ports in Windows, for instance COM5. When MATLAB opens a connection with one of these devices and the device disconnects and reconnects, I am unable to use the device any more. What can I do to regain access to the device?
ERROR: myComPort = serial(‘COM5’);fopen(myComPort);% now disconnect the device
% now connect the device again, the following will be unsuccessful:delete(myComPort)
clear myComPortmyComPort = serial(‘COM5’);fopen(myComPort);Error using serial/fopen (line 72)
Open failed: Port: COM5 is not available. Available ports: COM1, COM3.
Use INSTRFIND to determine if other instrument objects are connected to the requested device. I use USB-devices that create virtual serial ports in Windows, for instance COM5. When MATLAB opens a connection with one of these devices and the device disconnects and reconnects, I am unable to use the device any more. What can I do to regain access to the device?
ERROR: myComPort = serial(‘COM5’);fopen(myComPort);% now disconnect the device
% now connect the device again, the following will be unsuccessful:delete(myComPort)
clear myComPortmyComPort = serial(‘COM5’);fopen(myComPort);Error using serial/fopen (line 72)
Open failed: Port: COM5 is not available. Available ports: COM1, COM3.
Use INSTRFIND to determine if other instrument objects are connected to the requested device. serial, reconnect MATLAB Answers — New Questions