Adding and Configuring a Model
- Updated2025-01-27
- 2 minute(s) read
Adding and Configuring a Model
Connect a model to other parts of the system and run the model on a hardware target.
VeriStand executes each model in its own loop. If a system definition contains
multiple models referencing the same compiled model, VeriStand makes a temporary
copy of the model so each loop has its own compiled model to execute.
Note Adding
more than one instance of the same compiled model causes errors if the model
accesses a shared resource, such as a dependency. Contact your model provider
for information about whether the model accesses such resources.
- Launch your project in the VeriStand Editor.
- On the Mapping Diagram on the Palette, click and drop the model node on the diagram.
-
In the Open dialog box, select a simulation model and
click Open.
The Mapping Diagram will load the model.
-
In the Configuration pane, use the
Item tab to modify the model.
-
Set the Initial state of the model to Running or
Paused.
Note To change the values of model parameters before the first time step, set the Initial state to Paused.
- Set the Decimation of the model rate.
- Click Import parameters.
-
In the Import Parameters dialog box, select the
parameters you want to import as channels and click
OK.
The parameters you selected appears inside the node when you expand it.Note Importing too many parameters negatively impacts system performance.
- Click Import signals.
-
In the Import Signals dialog box, select the
signals you want to import as a channels and click
OK.
The signals you selected appears inside the node when you expand it.Note Importing too many signals negatively impacts system performance.
- Optional:
If your model contains a vector inport or outport, set the
Vector port specification as
Segment into scalar channels or
Maintain as vector channel.
Note Scalar channels provide greater flexibility than vector channels. Vector channels only map to models that contain a vector channel of the same size. You cannot map a vector channel to controls or indicators on your Workspace or use it with calculated channels, alarms, procedures, and others.
-
Set the Initial state of the model to Running or
Paused.
- Wire the channels to create mappings.
-
Depending on your goal, complete the following tasks to configure the model
further.
Goal Task Set model timing Adjust the step size to have the model run at a different rate. Set model parameters Use the VeriStand Editor, Workspace, Model Parameter Manager, and Stimulus Profile Editor to set the values of model parameters. Scope global parameters Update the scope of all global parameters in a model to the target-level or model-level. Set the default values for inports Change the default value for an inport to prevent your models from using invalid values. Configure the execution order of multiple models Define the order that the Primary Control Loop (PCL) executes models. - Save the system definition file.