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.Config
recommends, and save the model.
Specify this approach using the SaveModel
property.
List the values that cgv.Config
recommends for the configuration parameters, but not change the
configuration parameters or the model. Specify this approach using the
ReportOnly
property.
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 the getRefConfigSet
method of the Simulink.ConfigSetRef
class.
If you use cgv.Config
on 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 that cgv.Config
. For more information, see Callbacks for Customized Model Behavior.
To verify that your model is configured for SIL or PIL:
Construct a cgv.Config
object that
changes the configuration parameter values without saving the model.
Determine and change the configuration parameter values that the object
recommends using the configModel
method.
Display a report of the changes that configModel
makes.
Review the changes.
To apply the changes to your model, save the model.