Some example models that are included in the Simulink library, there are some variables that their value is not visible. For instance, in the model power_PVarray_grid_det the sample time of the powergui is defined as Ts_Power. I can not figure out the value of this variable. Is there a way to find these hidden variables, have access to them and change their value?
1 Answer
\$\begingroup\$
\$\endgroup\$
3
Click the
File/Model Properties/Model Properties
item in the model window menuSelect the
Callbacks
tab in the model properties dialog window
Then you can see that the PreLoadFcn
callback is defined as follows:
This code is executed before the model is loaded, so Ts_Power
is initialized to 10^-6.
-
\$\begingroup\$ thank you. Do you know if there is a way to edit these variables through command line or a script? \$\endgroup\$ Commented Jan 16, 2019 at 8:32
-
2\$\begingroup\$ I was about to post this. Save the example locally and remove those variables out of the callback. \$\endgroup\$– user16222Commented Jan 16, 2019 at 8:36
-
\$\begingroup\$ You can also call your own script from the callback \$\endgroup\$– AVKCommented Jan 16, 2019 at 8:57