Unable to connect to Arduino in External Mode

1 view (last 30 days)
Anna
Anna on 31 Aug 2018
Edited: Amal George M on 4 Sep 2018
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 Comment
Amal George M
Amal George M on 4 Sep 2018
Edited: Amal George M on 4 Sep 2018
Hi Anna,
The 'rensselaer-arduino-support-package-library-rasplib' is tested for Matlab Versions 2015a-2017a only.

Sign in to comment.

Answers (0)

Categories

Find more on Arduino Hardware in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!