Arduino simulink connection error

조회 수: 51 (최근 30일)
Muhammad Rizwan
Muhammad Rizwan 2020년 6월 29일
편집: Stefanie Schwarz 2024년 4월 23일
HI
I am trying to run Arduino example on my Arduino uno board from simulink.
Every time it shows the same error though I changed ports number and also reinstalled packages too.
Could not connect to specified Arduino board.
Verify that the board is connected to your host, and that the host COM port number set in the model matches the COM port number in Windows.
To change the host COM port number in the model, click 'Simulation ', click 'Model Configuration Parameters'... In the dialog that opens, select the 'Hardware Implementation' pane, click 'Target hardware resources > Host-board connection' and set the COM port number.
To find out the COM port number in Windows, open Device Manager and open your board in the COM ports group.
NOte:
In matlab window if I enter arduino() it shows the connection details though.
  댓글 수: 3
Muhammad Rizwan
Muhammad Rizwan 2020년 9월 14일
Hi Fábio Silva ,
No I havenot got the answer yet.
Matlab customer support asked to contact arduino support for this issue:).
Regards
Natasha Smith
Natasha Smith 2022년 12월 27일
I'm having the same issue. Have tried everything in this thread to no avail.

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

답변 (2개)

Mohith Prabhu
Mohith Prabhu 2020년 7월 1일
Hello Muhammad Rizwan,
Here are a few pointers to try and resolve the issue that you are facing
1) Make sure the model is configured for the correct hardware that you intend to use. You can change the Hardware board in the Hardware Implementation section of the Simulink Configuration settings.
2) Once the hardware is set correctly, if you continue to see the issue, you can try specifying the COM port number of your hardware bord manually in the Configuration Settings. In the Simulink Configuration settings, navigate to Hardware Implementation > Hardware board settings > Target Hardware resources > Host-board connection. Change the "Set host COM port" option to "Manually". In the COM port number dialog box, enter the COM port number corresponding to your hardware. You can find the COM port number for your board from the Windows hardware manager.
3) In the case of using MATLAB support package for Arduino hardware along with the Simulink support package for Arduino hardware, ensure that you do not have any active connections between the MATLAB and the hardware, To ensure this, you can proceed to Simulink model deployment after clearing any existing "arduino" connections from MATLAB to your hardware.
Hope this helps.
Kindly let us know if these pointers help you resolve the issue.
Thanks and Regards,
Mohith Prabhu
  댓글 수: 2
Muhammad Rizwan
Muhammad Rizwan 2020년 7월 1일
Dear Mohith,
Thanks for the reply.
I have already tried these solutions but none of them worked.
Once the example for arduino worked but not now.
Mohith Prabhu
Mohith Prabhu 2020년 7월 1일
In that case, may I request you to contact MathWorks technical support for further assistance
Regards,
Mohith

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


경민 박
경민 박 2022년 7월 22일
I had same problem, and this is how I solved it.
In my case, I created new empty folder, and then in MATLAB I moved my Current Folder to that new empty folder.
Then it worked.
  댓글 수: 3
Ramiro
Ramiro 2024년 1월 8일
Amazingly... this worked. WTF...
vaishnavi
vaishnavi 2024년 3월 9일
it's not working

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

카테고리

Help CenterFile Exchange에서 Arduino Hardware에 대해 자세히 알아보기

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by