Statement Step Type

TestStand 2019 Help

Edition Date: May 2019

Part Number: 370052AA-01

»View Product Info
Download Help (Windows Only)


This example demonstrates how to use an expression in a Statement step to dynamically change the high and low limits of a Numeric Limit Test step.

Note Note  National Instruments typically recommends that you use expressions when you configure a Numeric Limit Test step or to use a Property Loader step to change limits, but this example demonstrates how to change step properties.

Example File Location

Open Example

<TestStand Public>\Examples\Built-In Step Types\Statement Step Type\Statement Step Type.seq

Highlighted Features


Major API




How to Use This Example

Complete the following steps to use this example.

  1. On the Steps pane, select the Numeric Limit Test step.
  2. On the Step Settings pane, click the Limits tab. The comparison type for the step is currently GELE (>= <=), with a high value of 10 and a low value of 0.

    When accessed from the Numeric Limit Test step, the numeric limits for the Numeric Limit Test step are Step.Limit.High and Step.Limit.Low. However, another step cannot access the variables Step.Limit.High and Step.Limit.Low, as shown in this example. Instead, you must explicitly specify the step that specifies the properties you want to access.
  3. On the Steps pane, select the A Statement that changes the numeric limits step, which is a Statement step.
  4. On the Step Settings pane, click the Expression edit tab. The Expression tab contains two expressions, separated by a comma, that specify the high limit as 11 and the low limit as 0:

    RunState.Sequence.Main["Numeric Limit Test"].Limits.High = 11, RunState.Sequence.Main["Numeric Limit Test"].Limits.Low = 0

    The expressions specify that you want to use the Numeric Limit Test step to specify the properties you want to access.

    Alternatively, you could use the following expression:

  5. Select Execute»Single Pass to run the sequence.
  6. When the execution completes, review the report. For the Numeric Limit Test step, the High Limit value is 11, and the Low Limit value is 0.

Because the Statement step executed before the Numeric Limit Test step in the sequence, changing the limits after the Numeric Limit Test executes does not change the limit values.


Not Helpful