Rapid accelator can't be used (but normal and accelator can be use)

10 views (last 30 days)
Hi!
My simulink could run in a normal mode and a accelerator mode. However, it couldn't run in a rapid accelator and it will give me the warnings like that:
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
External mode commands may only be issued when in external mode and connected to the target
I'm sure that I have switched the target and haven't clicked the stop button. So how could I solve the warnings?
By the way, the version of my matlab is R2021b. Could it be a problem with the version?
  3 Comments
Rik
Rik on 7 Sep 2023
Comment posted as flag by @皓芊:
I'm sorry, I don't quite understand what you mean, could you put it another way?
Fangjun Jiang
Fangjun Jiang on 7 Sep 2023
Edited: Fangjun Jiang on 7 Sep 2023
The simulation mode can be normal, accelerator, rapid (accelerator), or external.
In the title, you asked about "rapid accelerator" mode.
In the content, the error message indicates "external" mode.

Sign in to comment.

Answers (1)

Dinesh
Dinesh on 26 Sep 2023
Hi,
I understand that you are trying to run your model in rapid accelerator mode, and you are facing an error. The reason for the error is because 'External mode' is used under the hood by Rapid Accelerator when simulating with the play button. Please refer to the following MATLAB documentation for more details regarding the rapid accelerator mode.
To resolve this issue, I suggest trying to run the model in rapid accelerator mode using the 'sim' function in MATLAB. Unlike the play button, this approach does not use external mode under the hood.
Please refer to the following technical article for an example on using rapid accelerator using 'sim' function.
For more details regarding the 'sim' function please refer to the following MATLAB documentation
  1. https://www.mathworks.com/help/simulink/slref/sim.html#namevaluepairarguments
If the issue persists then please contact MathWorks Customer support for further assistance.
Hope this helps.
Best Regards,
Dinesh Reddy Gatla.

Categories

Find more on Prepare Model Inputs and Outputs in Help Center and File Exchange

Products


Release

R2021b

Community Treasure Hunt

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

Start Hunting!