Issue connecting Simulink to Arduino Nano 33 IoT

12 次查看(过去 30 天)
I'm having an issue connecting my Arduino Nano 33 IoT to simulink. When I try to run it, I get the error message: "Unrecognized feild name " HostCOMPort" " I'm unsure how to resolve this and would greatly appricate the help!
The device shows up in my device manager and I can run code in Arduino IDE and Matlab without issues. Its only when I use Simulink is there a problem. Im using the cable that came in the Engineering Rev 2 kit from Arduino as well as a usb to usb-c converter to plug into my surface go to connect my computer to the Nano. I am able to run a regular Arduino Uno using the same setup through simiulink.
I've notcied that everytime I try to run the simulink program, the port in the device manager will change from "Arduino Nano 33 IoT" to the bootloader version. And also Matlab will tell me that an arduino device is detected again. My guess is that the Nano is restarting everytime or something? Im not really sure.

采纳的回答

Abhinav Aravindan
Abhinav Aravindan 2024-8-20
编辑:Abhinav Aravindan 2024-8-20
I have faced a similar issue earlier and performing a clean reinstallation of the support package “MATLAB Support Package for Arduino Hardware” resolved the issue. Additionally, you may try specifying both the Host COM port and Bootloader COM port in Simulink to build and deploy a design to the board as mentioned in the below documentation:
If you are using versions of MATLAB earlier to R2024a, you may install the latest update available for the MATLAB release you are using as there have been several bug fixes as per the documentation.
I hope this helps resolve your issue!
  1 个评论
jesse
jesse 2024-8-20
Unistalling and reinstalling the matlab support for simulink add on AFTER downloading the drivers from the Arduino IDE seems to have fixed the issue. Thank you

请先登录,再进行评论。

更多回答(1 个)

Pratyush
Pratyush 2024-8-20
Hi Jesse,
To resolve the issue with connecting your Arduino Nano 33 IoT to Simulink, try the following steps:
  • Ensure the correct COM port is set in Simulink, as it might change when the device enters bootloader mode.
  • Update MATLAB, Simulink, and the Arduino Support Package to the latest versions.
  • The board entering bootloader mode is normal; add a delay in your Simulink model to stabilize the connection.
  • Ensure correct drivers are installed for the Arduino Nano 33 IoT.
  • Ensure External Mode is configured correctly if used.
  • Run a simple Simulink model to check if the problem persists.
  • Test with a different USB converter or direct connection.
  • Consider reinstalling the Arduino Support Package in MATLAB.
Hope this helps.

类别

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

产品

Community Treasure Hunt

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

Start Hunting!

Translated by