Check Configuration
Use the cgv.Config class to check model settings
for a SIL or PIL simulation. You can review your model configuration and determine the
settings that you must change. By default, cgv.Config
changes configuration parameter values to the value that it recommends, but does not
save the model. Alternatively, you can:
Change configuration parameter values to the values that
cgv.Configrecommends, and save the model. Specify this approach using theSaveModelproperty.List the values that
cgv.Configrecommends for the configuration parameters, but not change the configuration parameters or the model. Specify this approach using theReportOnlyproperty.
Note
Execution in the target environment can require additional modifications to configuration parameter values or the model.
Do not use referenced configuration sets in models that you are changing using
cgv.Config. If the model uses a referenced configuration set, update the model with a copy of the configuration set. Use thegetRefConfigSetmethod of theSimulink.ConfigSetRefclass.If you use
cgv.Configon a model that executes a callback function, the callback function can change configuration parameter values each time the model loads. The callback function can revert changes thatcgv.Config. For more information, see Customize Model Behavior with Callbacks.
To verify that your model is configured for SIL or PIL:
Construct a
cgv.Configobject that changes the configuration parameter values without saving the model.Determine and change the configuration parameter values that the object recommends using the
configModelmethod.Display a report of the changes that
configModelmakes.Review the changes.
To apply the changes to your model, save the model.