Getting error while running Arduino in external mode in simulink(r2012b)

조회 수: 6 (최근 30일)
shri raje
shri raje 2013년 5월 29일
답변: Rok Avsec 2018년 12월 20일
Respected sir, I am getting following error when I am trying to communicate arduino mega 2560 with simulink in external mode, I have also followed all instruction provided in manual(from matlab) error:- "Error occurred while executing External Mode MEX-file 'ext_serial_win32_comm':Timed-out waiting for first connect response packet." ,plz help
  댓글 수: 3
Malith Fernando
Malith Fernando 2017년 2월 22일
편집: Walter Roberson 2017년 4월 9일
Having the similar problem
Build process completed successfully
Error occurred while executing External Mode MEX-file 'ext_serial_win32_comm_rtt':
Failed to connect to the target. A time-out occurred while waiting for the connection response from the target. Possible reasons for the time-out:
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.
Martin L
Martin L 2017년 4월 23일
Has anyone managed to fix this problem? Can you tell me how?

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

답변 (3개)

Gergely Takács
Gergely Takács 2014년 2월 13일
Hello all;
Same problem here. 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
  댓글 수: 1
Loup Letac
Loup Letac 2017년 4월 9일
편집: Walter Roberson 2017년 4월 9일
Any news about this problem ? I have the same, even with one analog input and one output. But the program does compile properly.
Thank you
----------------------------------------------------------------------------------------------------
MATLAB Version: 9.1.0.441655 (R2016b)
MATLAB License Number: ••••••
Operating System: Microsoft Windows 7 Professional Version 6.1 (Build 7601: Service Pack 1)
Java Version: Java 1.7.0_60-b19 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
----------------------------------------------------------------------------------------------------
MATLAB Version 9.1 (R2016b)
Simulink Version 8.8 (R2016b)

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


Rolfe Dlugy-Hegwer
Rolfe Dlugy-Hegwer 2013년 8월 28일
Thanks for your message, Shri. It looks like a problem with the physical connection or configuration. First test that you can run a model on the Mega 2560, without External mode. Then, enable External mode using ONLY those settings mentioned in http://www.mathworks.com/help/simulink/ug/remotely-monitoring-and-controlling-an-application-on-arduino-hardware.html

Rok Avsec
Rok Avsec 2018년 12월 20일
I had the same problem. Go and readthis thread. I spent 2 days looking arround but this did the trick in 1 minute.

카테고리

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