フィルターのクリア

Open a parameterization script from simulink

2 ビュー (過去 30 日間)
Thomas McNEil
Thomas McNEil 2018 年 6 月 6 日
コメント済み: Thomas McNEil 2018 年 6 月 6 日
I am new to simulink, so I started going through the examples. One I found, is pe_dc_motor_control. When I run this in the command window, a simulink model opens from the following directory. C:\Program Files\MATLAB\R2017b\toolbox\physmod\pe\pedemos The simulink model is : pe_dc_motor_control.slx When it runs, many variables are loaded into the workspace from a .m file, named pe_dc_motor_control_data.m. Without these variables being loaded, the simulink model will not run. I cannot locate in the Simulink model where this file is called out to load. I do not see any user-defined functions-> matlab blocks or S-Functions in the Simulink model that calls this script out to be loaded in the workspace. In the text block, pe_dc_motor_control_data.m is referred to as the Associated Parameterization Script, but I can't find a reference to it in the Simulink model other than that hyperlink. Can you explain how this file gets called?

採用された回答

Christopher Wallace
Christopher Wallace 2018 年 6 月 6 日
Hi Thomas,
The data file is being loaded in the PreLoadFcn callback within the Model Properties. There is a number of ways to open the callbacks, one of them is to right click on the whitespace in the model and select "Model Properties". From there you should see a tab labeled "Callbacks" which will list the available callbacks for the model. PreLoadFcn will have an asterisks next to it indicating that changes have been made.
Best Regards,
Chris
  1 件のコメント
Thomas McNEil
Thomas McNEil 2018 年 6 月 6 日
Thank you, that was exactly what I needed.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeProgrammatic Model Editing についてさらに検索

製品


リリース

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by