Setting Model Timing
- Updated2025-04-08
- 2 minute(s) read
Setting Model Timing
Adjust the step size to have the model run at a different rate.
The following equation describes how the VeriStand Engine executes models:
actual model rate = Primary Control Loop (PCL) rate / model decimation
Modify the system definition to alter this equation.
- Launch your project in the VeriStand Editor.
- In the Project Files pane, left-click a system definition file (.nivssdf) and select Configure in System Explorer.
-
Set the PCL rate.
- Click in the configuration tree.
- Under Timing Source Settings, set a Target Rate.
-
Set the model decimation.
- Click in the configuration tree.
- Click a model.
- Under Model Settings, enter a Decimation.
- Save the system definition file.
If both the controller and plant are simulated, such as during a model-in-the-loop test, you can run your model at a different rate than specified when it was compiled. For example, you can set the Primary Control Loop of a model compiled to run at 100 Hz to 1 kHz, or 10 times faster than real time (assuming model decimation is 1).
This results in more simulations and more data in a shorter amount of time. However, a model that does not run in real time is potentially unstable. When testing with hardware, such as hardware-in-the-loop testing, run your model at the rate it was compiled to accurately simulate the system.
Related Information
- VeriStand Engine
The VeriStand Engine is the execution mechanism that controls the timing of the entire system and the communication between the target and the host computer.