Declaring Variables in a Real-Time Sequence
- Updated2025-01-28
- 2 minute(s) read
Declaring Variables in a Real-Time Sequence
Declare and define the variables a real-time sequence can access and act on.
Section | Description |
---|---|
Return Variable | The value the real-time sequence returns after it executes. |
Parameters | The inputs and outputs that the sequence accepts when called and can pass out to other sequences or the stimulus profile. |
Local Variables | Variables you want to access from statements within the current sequence. |
Channel References | References that allow you to read/write system
definition channels directly from a real-time
sequence. Note Channel references bind to specific
system definition channels when added to a
real-time sequence. The sequence that contains
them is bound to that system definition file. If
you want to write a sequence that you can reuse
across multiple system definition files, use
Parameters. |
- Open a real-time sequence.
-
Declare a Return Variable.
-
Determine the data type you want the sequence to return:
- Boolean—Returns a true/false value that indicates if the sequence passes.
- Void Return Value—If you do not need to perform a pass/fail evaluation on the sequence.
- In the Primitives palette, drag a data type from the Variables folder to the Return Variable section of the Variables pane.
- In the Variables pane, select the variable and use the Property Browser to configure its name and, for a Boolean, default value.
-
Determine the data type you want the sequence to return:
-
Declare a Parameter.
-
To conserve memory, select the smallest possible data type that can
hold the value you want to pass into or out of the sequence.
Note Use Double or Boolean primitives to create parameters to map to system definition channels. All channels in VeriStand are 64-bit floating point numbers (doubles), but many can also accept Boolean values.
- In the Primitives palette, drag a data type from the Variables folder to the Parameters section of the Variables pane.
- In the Variables pane, select a variable and use the Property Browser to configure its Default Assignment, or the channel it maps to.
-
To conserve memory, select the smallest possible data type that can
hold the value you want to pass into or out of the sequence.
-
Declare a Local Variable.
- To conserve memory, select the smallest possible data type that can hold the value you want to pass into or out of the sequence.
- In the Primitives palette, drag a data type from the Variables folder to the Local Variables section of the Variables pane.
- In the Variables pane, select a variable and use the Property Browser to configure its Default Value.
-
Declare a Channel Reference.
- In the Variables pane, right-click the Channel References section and click Insert Channels.
- Use the configuration tree to select the channels you want to add as Channel References and click OK.
Related Information
- Creating Real-Time Sequences
Use real-time sequences to define specific tasks for a unit under test (UUT).
- Boolean Variable
A Boolean value.
- Void Return Value
Returns void, or no value, when used as the return variable for a real-time sequence.