EV3 SImulink external mode fails
1 view (last 30 days)
Show older comments
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 Comment
Luigi Avallone
on 28 Dec 2023
Hi i have the same problem. i comment this hoping someone could help me.
Answers (1)
Kautuk Raj
on 18 Oct 2024
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.
0 Comments
See Also
Categories
Find more on LEGO MINDSTORMS EV3 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!