String Value Test Step

TestStand 2019 Help

Edition Date: May 2019

Part Number: 370052AA-01

»View Product Info
Download Help (Windows Only)

The String Value Test step calls a code module that returns a string value.

After the code module executes, the String Value Test step type compares the string the step obtains to the string the step expects to receive. If the string the step obtains matches the string the step expects, the step type sets the step status to Passed. Otherwise, it sets the step status to Failed.

Configuring the Step

Use the String Value Test edit tabs in the TestStand Sequence Editor and the Edit String Value dialog box in a TestStand User Interface to specify the type of comparison and limits TestStand uses to set the step status and the string the step expects to receive.

A String Value Test step uses the Step.Result.String property to store the string value. A code module can set the value of Step.Result.String in the following ways:

  • LabVIEW Adapter—Specify Step.Result.String as the Value expression for a Numeric output of a VI on the LabVIEW Module tab.
  • LabWindows/CVI, C/C++ DLL, .NET, ActiveX/COM, or Sequence Adapter—Pass Step.Result.String as a reference parameter to a subsequence or code module.
  • LabVIEW or LabWindows/CVI Adapter—The LabVIEW and LabWindows/CVI Adapters update the value of Step.Result.String automatically after calling legacy code modules. The LabVIEW Adapter updates the value of Step.Result.String based on the value of the String Measurement element of the Test Data cluster the VI returns. The LabWindows/CVI Adapter updates the value of Step.Result.String based on the value of the stringMeasurement field of the tTestData parameter it passes to the C function.
  • All Adapters—Use the TestStand API to set the value of Step.Result.String directly in a code module.

By default, the step type uses the value of the Step.Result.String property as the string value to compare the limits against.

Step Properties

In addition to the common custom properties, the String Value Test step type defines the following step properties:

  • Step.Result.String—The string value. Usually, you set this value in the code module.
  • Step.Limits.String, StringExpr, and UseStringExpr—The expected string for the string comparison.
  • Step.Comp—The type of comparison.
  • Step.CompExpr—The comparison operation using an expression.
  • Step.UseCompExpr—The step uses the expression to compare the string values.
  • Step.InBuf—An arbitrary string the LabVIEW and LabWindows/CVI Adapters pass to the test in the Input Buffer control or tTestData structure of legacy code modules. This property maintains compatibility with previous test executives. Usually, code modules you develop for TestStand receive data as input parameters or access data as properties using the TestStand API.
  • Step.DataSource—A string expression the step type uses to set the value of Step.Result.String. The default value of the expression is "Step.Result.String", which has the effect of using the value that the code module sets. You can customize this expression when you do not want to set the value of Step.Result.String in the code module.

You can use a String Value Test step without a code module, which is useful when you want to test a string you have already acquired. Select <None> as the module adapter before you insert the step in the sequence and configure Step.DataSource to specify the string you have already acquired.


See Also

Calling Legacy LabVIEW Code Modules

Calling Legacy LabWindows/CVI Code Modules

Step Types You Can Use with Any Module Adapter

WAS THIS ARTICLE HELPFUL?

Not Helpful