<Action> Element

TestStand ATML Toolkit 2017 Help

Edition Date: June 2018

Part Number: 374205B-01

»View Product Info
Download Help (Windows Only)

<Parameters> Element

The ATML TD translator translates each <Action>/<Parameters>/<Parameter> element as an input for a code module.

(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 a control in the VI for each <Parameter> element.

(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] parameter for each <Parameter> element.

The translator creates a local variable for each <Parameter> element and names the local variable actionName_Parameter_parameterName, where actionName is the value of the name attribute of the parent <Action> element and parameterName is the value of the name attribute of the <Parameter> element.

The <Parameter>/<Value> element specifies the value of the local variable. The child elements of the <Value> element determine the type of the local variable, as the following table describes.

Child Element of <Value> Element Local Variable Type
<Datum> Single data value
<Collection> Collection of data values
<IndexedArray> Array of data values

(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_Parameters, and passes the container to the LabVIEW code module as an object reference. The actionName is the value of the name attribute of the parent <Action> element.

(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_Parameters, and passes the container to the function as an object reference. The actionName is the value of the name attribute of the parent <Action> element.

Note Note  The translator stores <Resolution>, <ErrorLimits>, <Confidence>, and <Range> elements defined for <Parameter> elements as attributes of the local variable.
Completing the Partial Test Program Completing the Partial Test Program  If the <Parameter> element contains a <Reference> child element, the translator creates translates the <Parameter> element as a string type local variable. The translator stores the XML content of the <Reference> element in the string local variable. At run time, you can use the string value to obtain information about the document the parameter references. Refer to the post-translation recommended actions section of the log file for more information about how you can implement the logic the <Reference> element describes.
Incremental Update Incremental Update  The translator uses the values of the name and ID attributes of the <Parameter> element to identify the local variable to update. If you modify a <Parameter> element in the source TD instance document, the translator updates the local variable in the sequence file by modifying the local variable type or updating the local variable value.

The following table describes how the translator incrementally updates existing controls in a LabVIEW VI or parameters in the LabWindows/CVI function that correspond to <Parameter> 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 <Parameter> element. The translator creates a copy of the corresponding control in the VI, updates the type of the copied control, and renames the original control controlName_Old. If a control or indicator with the name controlName_Old already exists, the translator appends a number suffix to the control it is updating to ensure the name is unique. You must modify the VI to use the updated control instead of the original control, and you can then optionally delete the original control. The translator updates the corresponding [In] parameter in the function.
You insert any <Parameter> element. The translator creates a control in the VI. The translator creates an [In] parameter in the function.
You delete any <Parameter> element. The translator renames the corresponding control in the VI controlName_Old and disconnects the control from the connector pane. If a control or indicator with the name controlName_Old already exists, the translator appends a number suffix to the control it is updating to ensure the name is unique. You must delete the disconnected control from the VI and ensure that deleting the control does not break the VI. The translator deletes the corresponding [In] 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

Logging Translation Information

Passing Parameters to LabVIEW Code Modules

Passing Parameters to LabWindows/CVI Code Modules

WAS THIS ARTICLE HELPFUL?

Not Helpful