Creating a Basic Real-Time Sequence
- Updated2025-10-27
- 3 minute(s) read
Create a real-time sequence that starts, stalls, and stops the engine demo.
- In the VeriStand Editor, click .
- In the Stimulus Profile Editor, click New Real-Time Sequence.
- Save the sequence as Engine Demo Basics tutorial.nivsseq in the <Common Data> \VeriStand Projects\Engine Demo\Stimulus Profiles\Basic Engine Demo directory.
-
Add blocks to organize your code.
- In the Primitives palette, expand Miscellaneous and drag a Block into the Setup section of the real-time sequence.
- In the Property Browser Name field, enter Turn on engine.
- Add a block to the Main section and name it Set engine speed to 2500 and wait.
- Add a block to the Clean Up section and name it Turn off engine.
-
Create variables.
Note For an example of how to use channel references to access channels, refer to .
- In the Primitives palette, expand Variables and drag a Boolean into the Parameters section of the Variables pane.
- In the Property Browser next to Default Assignment, click Browse to display the system definition channel tree.
-
Click View aliases
to display the aliases defined
in the system definition.
- Double-click EnginePower to assign this alias to the parameter.
- In Identifier, enter EnginePower.
- In Units, enter On/Off.
- Select Double from the Primitives palette and drag it to Parameters to add a double-precision numeric parameter after EnginePower.
- In the Property Browser, name the new parameter DesiredRPM, map the parameter to the corresponding alias, and enter the units as RPM.
-
Add variables to the sequence code and set their values.
- In the Variables pane, drag EnginePower into the Turn on engine block.
-
In the Property Browser, edit the
Expression to EnginePower =
true.
This value will turn the engine on when the block executes.
- Drag DesiredRPM into the Set engine speed to 2500 and wait block.
- Set DesiredRPM to 2500.
- Press <Ctrl> and drag DesiredRPM from the Set engine speed to 2500 and wait block into the Turn off engine block.
- Set DesiredRPM to 0.
- In the Variables pane, right-click EnginePower and select Copy.
-
Right-click Turn off engine and select
Paste.
Leave the value as false to turn the engine off when the block executes.
-
Set the expression to wait before it executes.
- In the Sequences palette, expand and drag Wait into the Set engine speed to 2500 and wait block.
-
In the Property Browser, edit the Expression to
replace Duration with
20.
This will hold the DesiredRPM value at 2500 for 20 seconds when this step executes.
-
Set a return value.
-
In the Primitives palette, expand
Variables and drag Void Return
Value into the Return Variable
section of the Variables pane.
Note By default, the return value node is named Pass.
- In the Property Browser, enter the Identifier as Output to change the name of the return value node.
-
In the Primitives palette, expand
Variables and drag Void Return
Value into the Return Variable
section of the Variables pane.
- Save the real-time sequence.

Related Information
- Deploying the Engine Demo
Deploy the engine demo's system definition before running a stimulus profile.
- VeriStand Directories and Aliases
VeriStand uses directories and aliases for project files, models, and custom devices.
- Reading and Writing Channels Directly from a Real-Time Sequence Tutorial
Use channel references, parameters, and variables to turn on a car engine, set the engine speed to three different RPM values, measure how long the engine takes to settle at each specified RPM, and turn the engine off.
- Creating a Basic Stimulus Profile
Configure a stimulus profile to execute a real-time sequence.
