| Contents | Index |
rsimgetrtp('model')
rsimgetrtp('model', 'AddTunableParamInfo'
'value')
rsimgetrtp('model') forces a block update diagram action for model, a model for which you are running rapid simulations, and returns the global parameter structure for that model.
rsimgetrtp('model', 'AddTunableParamInfo' 'value') includes tunable parameter information in the parameter structure if value is 'on'. The function omits tunable parameters if value is 'off'. To use AddTunableParamInfo, you must enable inline parameters.
The model parameter structure contains the following fields:
| Field | Description |
|---|---|
| modelChecksum | A four-element vector that encodes the structure. The Simulink Coder software uses the checksum to check whether the structure has changed since the RSim executable was generated. If you delete or add a block, and then generate a new version of the structure, the new checksum will not match the original checksum. The RSim executable detects this incompatibility in model parameter structures and exits to avoid returning incorrect simulation results. If the structure changes, you must regenerate code for the model. |
| parameters | A structure that defines model global parameters. |
The parameters substructure includes the following fields:
| Field | Description |
|---|---|
| dataTypeName | Name of the parameter data type, for example, double |
| dataTypeID | An internal data type identifier |
| complex | Value 1 if parameter values are complex and 0 if real |
| dtTransIdx | Internal use only |
| values | Vector of parameter values |
If you set 'AddTunableParamInfo' to 'on', the function creates and then deletes model.rtw from your current working folder and includes a map substructure that has the following fields:
| Field | Description |
|---|---|
| Identifier | Parameter name |
| ValueIndicies | Vector of indices to parameter values |
| Dimensions | Vector indicating parameter dimensions |
Return global parameter structure for model rtwdemo_rsimtf to param_struct:
rtwdemo_rsimtf
param_struct = rsimgetrtp('rtwdemo_rsimtf')
param_struct =
modelChecksum: [1.7165e+009 3.0726e+009 2.6061e+009
2.3064e+009]
parameters: [1x1 struct]
Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |