| Contents | Index |
Check and modify model configuration parameter values
Creates a handle to a cgv.Config object that supports checking and optionally modifying models for compatibility with various modes of execution that use generated code, such as, Software-In-the-Loop (SIL) or Processor-In-the-Loop (PIL).
To execute the model successfully in the mode that you specify, you might need to make additional modifications to the configuration parameter values or the model beyond those configured by the cgv.Config object.
By default, cgv.Config modifies configuration parameter values to the values that it recommends, but does not save the model. Alternatively, you can use cgv.Config parameters to modify the default specification. For more information, see the properties, ReportOnly and SaveModel.
If you use cgv.Config to modify a model, do not use referenced configuration sets in that model. If a model uses a referenced configuration set, update the model with a copy of the configuration set, by using the Simulink.ConfigSetRef.getRefConfigSet method.
If you use cgv.Config on a model that executes a callback function, the callback function might modify configuration parameter values each time the model loads. The callback function might revert changes that cgv.Config made. When this change occurs, the model might no longer be set up for SIL or PIL. For more information, see Using Callback Functions.
cfgObj = cgv.Config(model_name) creates a handle to a cgv.Config object, cfgObj, using default values for properties. model_name is the name of the model that you are checking and optionally configuring.
cfgObj = cgv.Config(model_name, Name, Value) constructs the object using options, specified as parameter name and value pairs. Parameter names and values are not case sensitive.
Name can also be a property name and Value is the corresponding value. Name must appear inside single quotes (''). You can specify several name-value pair arguments in any order as Name1,Value1,…,NameN,ValueN.
| configModel | Determine and change configuration parameter values |
| displayReport | Display results of comparing configuration parameter values |
| getReportData | Return results of comparing configuration parameter values |
Handle. To learn how handle classes affect copy operations, see Copying Objects in the MATLAB Programming Fundamentals documentation.
Configure the rtwdemo_iec61508 model for top-model SIL. Then view the changes at the MATLAB Command Window:
% Create a cgv.Config object and configure the model for top-model SIL. cgvCfg = cgv.Config('rtwdemo_iec61508', 'LogMode', 'SaveOutput', ... 'connectivity', 'sil'); cgvCfg.configModel(); % Display the results of what the cgv.Config object changed. cgvCfg.displayReport(); % Close the rtwdemo_iec61508 model. bdclose('rtwdemo_iec61508');

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 |