Error downloading Simulink Model to Arduino Mega 2560 Rev3
显示 更早的评论
Hi,
I'm using Matlab 2013a (on a Windows 8 64-bit PC) with Arduino support package 3.0. Downloading models to an Arduino UNO is wokring without problems. But I can't download any model to a new Arduino Mega 2560 Rev3. Tested with the arduinomega2560_gettingstarted model. When Simulink says "Downloading.." RX/TX LEDs are just blinking twice and I get the following error:
_The call to realtime_make_rtw_hook, during the after_make hook generated the following error: Could not download the model to the target hardware. Verify the connection between the computer and target hardware.
The build process will terminate as a result.
Caused by: Could not download the model to the target hardware. Verify the connection between the computer and target hardware._
But the target is definitely connected, and downloading programs with Ardino IDE is working fine. I've also tested this on a different PC with Windows 7 with the same result. Can anyone give me a hint please?
采纳的回答
更多回答(4 个)
Hi, I am using Matlab 2013b on Mac OS 64bit, and I have the same problem of connection of the Arduino2560 R3. I couldn't find the file toolsInfoDataArduinoMega2560.p in the Matlab folder, I think because that file exists in the older versions of the Arduino support package. I have the last one, just downloaded from Mathworks Arduino Package Support. Is there another file or another way to solve my connection problem?
Thank you,
Andrea
Gergely Takács
2014-2-13
0 个投票
Hello all;
I have used this procedure and the external mode does work with certain very simple models. For example an analog input>double conversion>Embedded function for a y = u(5/1024); voltage conversion> scope combination works flawlessly.
However, as soon as I add another analog input, I get the same error as sri. The minimum not working example is two analog inputs with two scopes. The exact procedure goes like this: the building process is successful, and it says " Model Successfully Downloaded to Arduino Mega 2560 ". But then, upon trying to connect to the board, the process hangs at " Initializing " and after a while I get " Error occurred while executing External Mode MEX-file 'ext_serial_win32_comm': Timed-out waiting for first connect response packet. " I've also tried to run a simple embedded function with an extended Kalman filter inside (no inputs or outputs on Arduino) and a scope, but the same thing happened.
Details:
- MATLAB Version: 8.0.0.783 (R2012b)
- Operating System: Microsoft Windows 7 Version 6.1 (Build 7601: Service Pack 1)
- Java Version: Java 1.6.0_17-b04 with Sun Microsystems Inc. Java HotSpot™ 64-Bit Server VM mixed mode
- Board: Arduino Mega 2560
- Fixed Step Discrete Solver (tried 1, 0.1 sec)
- External mode enabled.
- Baud rates 9600
- Overrun detection enabled, on pin 13
- Computer Lenovo ThinkPad T410i
Any help would be much appreciated.
Gergely
Italo Rodrigues
2014-7-29
0 个投票
Hi, I found the same problem to Arduino UNO. How to fix this?
4 个评论
chfakht chfakht
2015-2-12
me too
roberto buelvas
2015-11-20
Me too
Martin Esteban Rivero Carrillo
2016-2-21
Me too
koe riguez
2016-9-14
me too
l z
2019-4-4
0 个投票
Thank you very much !
I used the way to slove my program.
类别
在 帮助中心 和 File Exchange 中查找有关 Downloads 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!