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

Mickael PIERRE
Mickael PIERRE 2021년 3월 12일
Hi there,
I have the same issue. Did you find a way around it?
Thank you,
Mickael

댓글을 달려면 로그인하십시오.

 채택된 답변

Walter Roberson
Walter Roberson 2013년 1월 18일

0 개 추천

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

Mathias Westlund
Mathias Westlund 2013년 1월 18일
이동: Walter Roberson 2025년 10월 23일
Thanks Walter. I will investigate instrreset.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Gavin
Gavin 2025년 10월 22일

0 개 추천

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);

카테고리

도움말 센터File Exchange에서 MATLAB에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by