Hi, I have a hardware intrument with a Matlab GUI that calls a few different USB devices. From time to time a USB connection fails. To resolve this I currently need to restart Matlab, the hardware or unplugg/replug the USB device. Is there a way to restart the USB communication from Matlab wihtout restarting any of the hardware or programs?
Thanks Mathias Westlund

1 comentario

Mickael PIERRE
Mickael PIERRE el 12 de Mzo. de 2021
Hi there,
I have the same issue. Did you find a way around it?
Thank you,
Mickael

Iniciar sesión para comentar.

 Respuesta aceptada

Walter Roberson
Walter Roberson el 18 de En. de 2013

0 votos

Mathworks has said there is no current mechanism to do this.
A small number of people have reported success using instrreset, but that is part of the Instrument Control toolbox.

1 comentario

Mathias Westlund
Mathias Westlund el 18 de En. de 2013
Movida: Walter Roberson el 23 de Oct. de 2025
Thanks Walter. I will investigate instrreset.

Iniciar sesión para comentar.

Más respuestas (1)

Gavin
Gavin el 22 de Oct. de 2025

0 votos

See this same issue with a solution here
workaround exists: you can delete the existing serial port connection and then establish a new connection. For example:
myComPort = serial('COM5');
fopen(myComPort);
% Now disconnect the device
delete(myComPort);
clear myComPort;
% Reconnect the device; the following will now be successful:
myComPort = serial('COM5');
fopen(myComPort);

Categorías

Más información sobre Instrument Control Toolbox Supported Hardware en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 17 de En. de 2013

Movida:

el 23 de Oct. de 2025

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by