Products & Services Solutions Academia Support User Community Company

Learn more about Real-Time Workshop   

rsimgetrtp - Global model parameter structure

Syntax

rsimgetrtp('model')
rsimgetrtp('model', 'AddTunableParamInfo' 'value')

Description

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:

FieldDescription
modelChecksumA four-element vector that encodes the structure. The Real-Time Workshop 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.
parametersA structure that defines model global parameters.

The parameters substructure includes the following fields:

FieldDescription
dataTypeNameName of the parameter data type, for example, double
dataTypeIDAn internal data type identifier
complexValue 1 if parameter values are complex and 0 if real
dtTransIdxInternal use only
valuesVector 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:

FieldDescription
IdentifierParameter name
ValueIndiciesVector of indices to parameter values
DimensionsVector indicating parameter dimensions

Examples

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]

See Also

rsimsetrtpparam

How To

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2010- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS