Error occurred while executing External Mode MEX-file 'ext_comm'

조회 수: 2 (최근 30일)
Jannis Wiemann
Jannis Wiemann 2021년 5월 25일
댓글: NGHIA 2023년 4월 8일
Hello,
everytime when I want to start my program in external mode on arduino MKR1000 I get the attached error. I already tried to reduce the baud rate but this doesnt work.
I use the MKR IMU Shield and the MKR Motor Shield. If I only use one of the adapter it works. But it dont work when I use them together.
Have somebody an idea what I can do to fix that problem?
Thanks in advance

답변 (1개)

Shiva Kalyan Diwakaruni
Shiva Kalyan Diwakaruni 2021년 5월 28일
Hi,
this might be a cause related to the background daemon that MATLAB uses to establish connection with the Arduino.
The daemon could be timing out before external mode is able to start successfully. The expected time needed to establish connection varies from computer to computer, and as a result, you may need to modify the timeout value to use external mode. Some users have only noticed this error when I2C sensors are connected to the Arduino.
Please follow these instructions to modify the timeout value:
1. Delete the file, which will be located in the following directory within the Support Package Root Directory:
<RootDirectory>\toolbox\target\supportpackages\arduinobase\+codertarget\+arduinobase\+registry\startDaemon.p
To determine the support package root on your local machine, please execute the following command:
>> SupportPackageRoot = matlabshared.supportpkg.getSupportPackageRoot
For example, if the above command returns "C:\ProgramData\MATLAB\SupportPackages\R2017a\", then the file will be located at:
C:\ProgramData\MATLAB\SupportPackages\R2017a\\toolbox\target\supportpackages\arduinobase\+codertarget\+arduinobase\+registry\startDaemon.p
For more information on this command, please refer to the documentation:
2. Copy the file startDaemon.m (attached) to
<SupportPackageRoot>\toolbox\target\supportpackages\arduinobase\+codertarget\+arduinobase\+registry\
3. Adjust the timeout value for your system by modifying the "ethernetTimeout" variable at line 80 of startDaemon.m and save the file.
4. Run the following commands at MATLAB command prompt:
>> clear classes;
>> clear pcode;
>> rehash toolboxcache
After making these changes, you should be able to run the external mode connection as before. Repeat steps 3 and 4 to tune the timeout value as needed for your system. If the issue persists, please contact technical support .
Hope it helps.
  댓글 수: 3
Shiva Kalyan Diwakaruni
Shiva Kalyan Diwakaruni 2021년 6월 28일
Hi, If the above tutorial doesn't work please contact technical support.
NGHIA
NGHIA 2023년 4월 8일
Hi, can you tell me file startDaemon.m is where?

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

카테고리

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

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by