writeBlockValue(ST) writes tuned parameter values from an slTunable interface to the Simulink® model that ST describes. Use this command, for example, to validate parameters of a control system that you tuned using slTunable.systune or slTunable.looptune.
writeBlockValue(ST,M) writes tuned parameter values from a generalized model, M, to the Simulink model described by an slTunable interface, ST. This syntax also updates the current values of the tunable parameters in ST to match their values in M. Only parameters common to both ST and M are updated. This syntax is equivalent to:
Use this syntax when M is a model that you have tuned using a function like systune, looptune, or hinfstruct. For example, M might be a generalized model that you obtained by linearizing your Simulink model, and then tuned to meet some design requirements.
writeBlockValue(___,block) updates only the specified block or blocks specified. You can use the block argument with any of the previous syntaxes.
writeBlockValue skips blocks that:
Have no default parametrization
Have a parametrization specified with slTunable.setBlockParam that is not compatible with the default parametrization. For example, you might specify the parametrization of a susbsystem or S-Function block in your model. In that case, slTunable.writeBlockValue cannot write the tuned parameter values to the model.
slTunable interface describing a Simulink model.
Tunable blocks of ST to write back to the Simulink model, specified as a string or cell array of strings that are listed in the TunedBlocks property of ST. You can specify a block with an abbreviated block name, provided that the string matches the end of the full block path and unambiguously identifies the block.
Control system with tuned parameters to write back to the Simulink model, specified as a generalized state-space (genss) model. Typically, M is the output of a tuning function like systune, looptune, or hinfstruct. The model M must have some tunable parameters in common with ST. For example, M might be a generalized model that you obtained by linearizing your Simulink model, and then tuned to meet some design requirements.