Unable to connect to Arduino in External Mode

조회 수: 3 (최근 30일)
Anna
Anna 2018년 8월 31일
편집: Amal George M 2018년 9월 4일
I am using Arduino MEGA 2560 with Matlab 2018a. I am trying to run the example Lab 1: Blinking the LED given in https://www.mathworks.com/matlabcentral/fileexchange/62702-rensselaer-arduino-support-package-library-rasplib
Lab1 part 1 works properly making the LED blink.
Then I extend the model with the gain slider and run in External mode. The model is deployed successfully but when I run the model I get the error
C:\PROGRA~1\Matlab\R2018a\sys\java\jre\win64\jre\bin\java.exe has not yet started.
Attempting to establish connection with hostname '127.0.0.1' through port 17725.
Error occurred while executing External Mode MEX-file 'ext_comm': Failed to connect to the target. Possible reasons for the failure: a) The target is not switched on. b) The target is not connected to your host machine. c) The application for the model is not running on the target. You might have clicked the Stop button. If the Run button is not dimmed, click it. Otherwise, click the Build button, which downloads and runs your application on the target.
Caused by: An error occurred attempting to open an rtIOStream. More detail may be reported in the MATLAB command window Component:Simulink | Category:Block diagram error Unable to connect to the 'Arduino Mega 2560' target for 'lab1_part2'.
  댓글 수: 1
Amal George M
Amal George M 2018년 9월 4일
편집: Amal George M 2018년 9월 4일
Hi Anna,
The 'rensselaer-arduino-support-package-library-rasplib' is tested for Matlab Versions 2015a-2017a only.

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

답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by