Unable to connect to Arduino in External Mode

4 次查看(过去 30 天)
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