Flag that indicates source of execution for Simulink block initialization code

1 回表示 (過去 30 日間)
sst
sst 2016 年 6 月 30 日
Is there a recommended way to tell within Simulink block initialization code, whether it is being executed during a Simulink Coder build, or a simulation, or simply by copying the block? For example, I would like the block initialization code to interrupt a build if an error condition arises during a build (by throwing an exception), but I would like to have it work differently when the initialization code is executed simply as a result of placing the block in the model. Likewise, I would like the code to interrupt a simulation if the initialization code is executed as a result of simulation.

回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by