Execute a .exe in Simulink

6 ビュー (過去 30 日間)
Hasenearl
Hasenearl 2017 年 5 月 29 日
コメント済み: Jyoti Agrawal 2024 年 5 月 15 日
Hello,
I have to execute a .exe in a Simulink model.
I already tried via Matlab Function Block and the system function, but that won't work, because system is not code-generateable. Is there another way to do this easily?
Thanks in advance.
Hasenearl

回答 (2 件)

Rachit Shah
Rachit Shah 2018 年 10 月 26 日
Interested in this one too

Gagan Agarwal
Gagan Agarwal 2023 年 11 月 22 日
Hi Hasenarl
I understand that you are trying to run 'a .exe' file in Simulink using a MATLAB function block,and you have encountered an issue because the 'system' function is not code-generatable. To address the issue, you can define the 'system' function as extrinsic which will enable the compiler to bypass code generation for the 'system' function using the following command:
coder.extrinsic('system');
After defining the funciton as extrinsic you can use 'system' function to run 'a.exe' file
For additional information regarding 'extrinsic' function please refer to the following documentation:
I hope it helps!
  1 件のコメント
Jyoti Agrawal
Jyoti Agrawal 2024 年 5 月 15 日
It was helpful !!!!

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeSources についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by