Generate + Simulate Extern creates all files and compiles them. Once all files are generated the system is executed once in the background. The option to generate and run using PTcl or C++ can be selected. To select a preferred simulation method, click the black triangle right next to the Generate + Simulate Extern icon. Select one of the methods available.
A single click on the icon will run the simulation in default mode. The default setting can be set via the Settings configuration. Under the Run Control item the option Preferred external simulation method.
With external simulations, model source code is regenerated only if a model has changed. The .cpp file must be updated in this case. As a result the compile process is a lot faster when recompiling after minor changes are made.
A number of Parameters can be defined for a system. These parameters are a class of arguments used to control the functions of a system. Parameters on system level are not used to control the model component on embedding, but to control its behavior during simulation. You can set simulation parameters in system models and can change them while in simulation mode.
Parameter definitions on system model level have an additional property called Scope. This property is used to specify whether the parameter is shown as a user interface control element in the Simulation Properties window. The system model defines the default values of visible parameters. These values can be changed anytime in the simulation control window without any modification of the system model. To change the default settings, click the Switch to Edit Mode icon before changing the parameter values. Save the model and return to simulation mode by clicking the relevant icon.
The following example is a continuation of the Sine Modulator Example. The system model Sine Modulator System defines two parameters to set the frequencies for the sine wave generators.
Follow the steps below to make SignalFrequency and CarrierFrequency visible within the Simulation Properties window.