<Action> Element

TestStand ATML Toolkit 2017 Help

Edition Date: June 2018

Part Number: 374205B-01

»View Product Info
Download Help (Windows Only)

<TestResults> Element

The ATML TD translator translates each <Action>/<TestResults>/<TestResult> element as an output parameter for a LabVIEW VI or as an input/output parameter for a LabWindows/CVI function.

(LabVIEW)  For a LabVIEW code module, the translator creates a VI for each <Action> element and names the VI using the value of the name attribute of the <Action> element. The translator creates an indicator in the VI for each <TestResult> element. The translator can specify the default value for the indicator.

(LabWindows/CVI)  For a LabWindows/CVI code module, the translator creates a function for each <Action> element, names the function using the value of the name attribute of the <Action> element, and inserts the function in the LabWindows/CVI code module. The translator then creates an [In/Out] parameter for each <TestResult> element.

Note Note  A <SessionDatum> element contains a <ValueDescription>/<DatumDescription> child element. The xsi:type attribute of the <DatumDescription> element contains a value that is a description type of a data type that the <DatumDescription> element describes.

The translator creates test results for LabVIEW and LabWindows/CVI code modules as local variables in TestStand if any of the following conditions are true:

  • The corresponding <TestResult> TD element does not contain a <ValueToTestResult> child element.
  • The code module uses a parameter as a data source to compare against limits.
  • A <Datum> element of the ValueFromActionResults type refers to the <TestResult> element by specifying its ID.

Otherwise, the translator creates test results under the Locals.AdditionalResultsVars local variable of the corresponding sequence and passes the variables as output parameters to the code modules.

A <TestResult> element can also include the <ValueToTestResult> element which can be used to copy the value returned by the <TestResult> element to a test group parameter's test result.

(LabVIEW)  If the total number of [In] and [Out] parameters to pass to the VI is 28 or fewer, the translator places the local variable under the Locals for the sequence. If the total number of parameters exceeds 28, the translator creates a container under the Locals for the sequence, names the container actionName_TestResults where actionName is the value of the name attribute of the parent <Action> element, and passes the container to the LabVIEW code module as an object reference.

(LabWindows/CVI) If the total number of [In] and [Out] parameters to pass to the LabWindows/CVI function is 32 or fewer, the translator places the local variable under the Locals for the sequence. If the total number of parameters exceeds 32, the translator creates a container under the Locals for the sequence, names the container actionName_TestResults where actionName is the value of the name attribute of the parent <Action> element, and passes the container to the function as an object reference.

Note Note  The translator stores <Resolution>, <ErrorLimits>, <Confidence>, and <Range> elements defined for <TestResult> elements as attributes of the local variable.
Incremental Update Incremental Update  If you modify the value of a <TestResult> element in the source TD instance document, the translator updates the local variable in the sequence file with the updated value if TestStand can evaluate the expression provided for the variable created for the <TestResult> element in the code modules at edit time.

If you modify a <TestResult>/<TestLimits> element, the translator resets limit values such as Low, High, and so on to the updated values in the TD instance document if the updated limits are still valid for the step.

If you add, modify, or delete a <TestResults>/<ValueToTestResult> element in the source TD instance document, the translator updates the post-expression of the step.

The following table describes how the translator incrementally updates existing indicators in a LabVIEW VI or parameters in the LabWindows/CVI function that correspond to <TestResult> elements. The LabWindows/CVI function the translator updates is the function the translator created in the C source file it created during the original translation.
Change in Source TD Instance Document Change in VI Change in Function
You modify a type of any <TestResult> element. The translator creates a copy of the corresponding indicator in the VI, updates the type of the copied indicator, and renames the original indicator indicatorName_Old. If a control or indicator with the name indicatorName_Old already exists, the translator appends a number suffix to the indicator it is updating to ensure the name is unique. You must modify the VI to use the updated indicator instead of the original indicator, and you can then optionally delete the original indicator. The translator updates the corresponding [In/Out] parameter in the function.
You insert any <TestResult> element. The translator creates an indicator in the VI. The translator creates an [In/Out] parameter in the function.
You delete any <TestResult> element. The translator renames the corresponding indicator in the VI indicatorName_Old and disconnects the indicator from the connector pane. If a control or indicator with the name indicatorName_Old already exists, the translator appends a number suffix to the indicator it is updating to ensure the name is unique. You must delete the disconnected indicator from the VI and ensure that deleting the indicator does not break the VI. The translator deletes the corresponding [In/Out] parameter from the function.

See Also

ATML Test Description Translator Configuration dialog box

Creating LabVIEW Code Modules for <Behavior> Elements

Creating LabWindows/CVI Code Modules for <Behavior> Elements

<Datum> Element

<DatumDescription> Element

Specifying Default Values for Indicators in VIs

WAS THIS ARTICLE HELPFUL?

Not Helpful