Main Content

simulateSystem

Simulate system specified by converter object

Description

simOut = simulateSystem(converter) simulates the system specified by the DataTypeWorkflow.Converter object, converter.

example

simOut = simulateSystem(converter,Name,Value) simulates the system specified by the DataTypeWorkflow.Converter object, converter, using additional options specified by one or more Name,Value pair arguments. This function accepts the same Name,Value pairs as the sim function.

simOut = simulateSystem(converter,simIn) simulates the system specified by the DataTypeWorkflow.Converter object, converter, using the inputs specified in the Simulink.SimulationInput object simIn.

simOut = simulateSystem(converter,ParameterStruct) simulates the system specified by the DataTypeWorkflow.Converter object, converter, using the parameter values specified in the structure, ParameterStruct.

simOut = simulateSystem(converter,ConfigSet) simulates the system specified by the DataTypeWorkflow.Converter object, converter, using the configuration settings specified in the model configuration set, ConfigSet.

Examples

collapse all

This example shows how to simulate the converter object's system.

Open the fxpdemo_feedback model.

open_system('fxpdemo_feedback');

Create a DataTypeWorkflow.Converter object for the Controller subsystem.

converter = DataTypeWorkflow.Converter('fxpdemo_feedback/Controller');

Simulate the model.

simulateSystem(converter);

Input Arguments

collapse all

Converter object for the system under design, specified as a DataTypeWorkflow.Converter object.

Simulation input for the system, specified as a Simulink.SimulationInput object or an array of Simulink.SimulationInput objects.

When you use a SimulationInput object as an input to the simulateSystem function, you can also specify the following Name,Value pair arguments.

ParameterValues
ShowSimulationManager

  • 'on' - Opens the Simulation Manager.

  • 'off' (default) - Does not open the Simulation Manager.

ShowProgress

  • 'on' - View the progress of the simulation in the command window.

  • 'off' (default) - The progress of the simulation does not display in the command window.

Names of the configuration parameters for the simulation, specified as a structure. The corresponding values are the parameter values.

Data Types: struct

Configuration set, specified as a Simulink.ConfigSet object, that contains the values of the model parameters.

Output Arguments

collapse all

Simulation output, returned as a Simulink.SimulationOutput object. The returned object includes the simulation outputs: logged time, states, and signals.

Tips

  • To name your simulation run, before simulation, change the CurrentRunName property of the DataTypeWorkflow.Converter object.

  • simulateSystem provides functionality similar to the sim command, except that simulateSystem preserves the model-wide data type override and instrumentation settings of each run.

Note

  • The SimulationMode property must be set to normal. The Fixed-Point Designer™ software does collect simulation ranges in Rapid accelerator or Hot restart modes.

  • The StopTime property cannot be set to inf.

  • The SrcWorkspace parameter must be set to either base or current.

Version History

Introduced in R2014b