EV3 SImulink external mode fails

2 次查看(过去 30 天)
Georgios Vagenas
Georgios Vagenas 2018-7-21
回答: Kautuk Raj 2024-10-18
Hello,
I am trying to control my Lego ev3 using Simulink. When I use Deploy to Hardware, it works perfectly. But this way, I cannot monitor my signals through my scopes, so I am trying to press "Run" instead, which gives me the following error:
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
The simulation mode is set to external. Any idea why this would happen and how can I fix it? My main purpose it to able to monitor my model's states, while I am running my simulink code on the hardware.
Thank you a lot, George
  1 个评论
Luigi Avallone
Luigi Avallone 2023-12-28
Hi i have the same problem. i comment this hoping someone could help me.

请先登录,再进行评论。

回答(1 个)

Kautuk Raj
Kautuk Raj 2024-10-18
The error you are experiencing when trying to use External mode with the EV3 brick is likely due to the connection method. External mode is supported only when the EV3 brick is connected via a WiFi or Ethernet connection. Unfortunately, it is not supported over USB or Bluetooth connections due to hardware limitations. You can refer to this MathWorks documentation for more details: https://www.mathworks.com/help/simulink/supportpkg/legomindstormsev3_ref/communicating-with-lego-mindstorms-ev3-hardware.html
To resolve this issue, try connecting your EV3 brick to your host machine using a WiFi or Ethernet connection. This should allow you to run and monitor your model in External mode successfully.

类别

Help CenterFile Exchange 中查找有关 LEGO MINDSTORMS EV3 Hardware 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by