Why do I receive 'Failed to open serial port COM* to communicate with the board' or 'Open fail: Port: COM* is not available. No ports are available.' error with MATLAB/Simulink support package for Arduino Hardware

1 次查看(过去 30 天)
Why do I receive the following error when trying to connect to Arduino Hardware with the MATLAB support package?
ERROR: Failed to open serial port COM6 to communicate with board Uno. Make
sure there is no other MATLAB arduino object for this board. For
troubleshooting, see Arduino Hardware Troubleshooting.
Correspondingly using the Simulink Support Package for Arduino, why do I receive the following error when building a model for the Arduino?
ERROR: Open fail: Port: COM* is not available. No ports are available.
Use INSTRFIND to determine if other instrument objects are connected to the requested device.

采纳的回答

MathWorks Support Team
编辑:MathWorks Support Team 2024-6-26
This issue mainly arises when MATLAB tries to connect to the Arduino via more than one connection.
This can happen if there is an existing "arduino" object in the workspace.
Make sure to clear the previous arduino objects before calling the arduino function again, or simulating a model on the Arduino.
To clear an arduino object "my_arduino":
>> clear my_arduino
Additionally check that other MATLAB instances are not connected to the Arduino.
If this does not resolve the error, please contact MathWorks Technical Support at:

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Arduino Hardware 的更多信息

标签

尚未输入任何标签。

产品


版本

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by