フィルターのクリア

How to create a "model parameters" block in Simulink?

2 ビュー (過去 30 日間)
Hatem
Hatem 2014 年 6 月 7 日
コメント済み: Youda 2017 年 11 月 2 日
Essentially, I need to recreate the "Model Parameters" block in commpccc (in the communications toolbox). It allows other users to quickly change the model parameters by accessing just one block. We don't want to have to change every value in every block, and we don't want an "initialization" .m -file either. I know this is done via the mask of an empty subsystem, but that's about as far I've got. All help is appreciated!

回答 (2 件)

Kaustubha Govind
Kaustubha Govind 2014 年 6 月 9 日
Hatem: The model uses a pretty simple mechanism as you've found out already. The mask of the empty subsystem calls a MATLAB file commpccc_init in the Mask Initialization pane (run "which commpccc_init" to find the file), which creates the structure 'prmPccc' in the base workspace. This structure has fields that holds values relevant to various blocks. All blocks in the model refer to fields in this parameter structure.

Hatem
Hatem 2014 年 6 月 18 日
Thanks for your help! I did spend some time on it, however, and wrote up the attached document for anyone who needs it. My main goal was to have a "self-contained" Simulink model, in other words to avoid using a .m-file to initialize the model. Note that this solution may not be the best and probably has its limitations, but solves my immediate issues. It is based off of the commpccc.slx example file provided by The Mathworks.
  1 件のコメント
Youda
Youda 2017 年 11 月 2 日
You are hero! Thanks

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

カテゴリ

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

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by