- Use a version of MATLAB prior to the R2020a release. If the Simulink model was produced using a later version of MATLAB, instructions for exporting the model to an earlier version can be found below:https://www.mathworks.com/help/releases/R2020a/simulink/ug/saving-a-model.html#f2-86382
- The second workaround would be to ensure that all C MEX S-functions used within the model are Level-2 S-functions. A guide on how to convert Level-1 S-functions to Level-2 can be found below: https://www.mathworks.com/help/releases/R2020a/simulink/sfg/converting-level-1-c-mex-s-functions-to-level-2.html
- The last workaround is to use Normal or Accelerator Mode as these modes are unaffected by the issue.
Error when running rapid accelerator mode : Error occurred while executing External Mode MEX-file 'ext_comm'
8 次查看(过去 30 天)
显示 更早的评论
Hi!
I'm running simulink with a s-function calling a external .dll file. I can run in normal mode. But error occurs when I try to run rapid accelerator mode.
Any idea what might cause this 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
1 个评论
Evan Parker
2022-7-14
编辑:Evan Parker
2022-9-22
This error is due to an issue that was introduced in MATLAB R2020a with using Level-1 C MEX S-functions in conjunction with Rapid Accelerator Mode when continuous states are present. One of the following workarounds can be used to avoid this issue:
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Block and Blockset Authoring 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!