Modell Callbacks (e.g. PreLoadFcn, InitFcn) not performed in Matlab 2016b

6 ビュー (過去 30 日間)
RobinZ
RobinZ 2017 年 6 月 7 日
編集済み: RobinZ 2017 年 8 月 4 日
Hello, in Matlab 2016b my model callbacks are not performed correctly any longer. Code that worked properly in a former Matlab version, for example "disp('test')" or "clear all", is not carried out when beeing called in the InitFcn in Matlab 2016.
Thank you very much! BR Robin

回答 (1 件)

Kushagr Gupta
Kushagr Gupta 2017 年 6 月 9 日
The commands mentioned should definitely work in R2016b in all kinds of callbacks as and when those callbacks are executed.
As they are not in your case , I recommend to create a Technical Support Case as this would take some additional debugging to figure out where the issue is.
  1 件のコメント
RobinZ
RobinZ 2017 年 8 月 4 日
編集済み: RobinZ 2017 年 8 月 4 日
Thank you! I created a Technical Support Case concerning this. Apparently apart from Matlab R2014a due to the introduction of the diagnostic viewer some Model Callback commands (e.g. "disp") are not shown in the command window any longer.
Possible workarounds: * starting the simulation with the 'sim' command * call the output in the command window with "fprintf"
I hope this may help someone sometime :)

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

カテゴリ

Help Center および File ExchangeModel, Block, and Port Callbacks についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by