Passing Parameters to LabVIEW Code Modules
- Updated2025-10-28
- 2 minute(s) read
Passing Parameters to LabVIEW Code Modules
The following table lists the parameters the ATML TD translator always passes to a LabVIEW code module:
| Parameter Name | Value | Description | Comments |
|---|---|---|---|
| Sequence Context | RunState.ThisContext | Object reference | The translator passes the Sequence Context parameter so you can access any variable in TestStand from the generated VI. |
| <Parameter> element | — | — | <Parameter> elements are [In] parameters. |
| <TestResult> or <SessionDatum> element | — | — | <TestResult> and <SessionDatum> elements are [Out] parameters. |
| PASS/FAIL Flag | Step.Result.PassFail | Boolean | A return value that indicates if the test passed or failed. The translator passes the PASS/FAIL Flag parameter to the code modules only if the translated step is a Pass/Fail Test step. |
| Error Out | Step.Result.Error | Container | A return value that contains the error state. LabVIEW passes the Error Out parameter back to TestStand. |
If the total number of [In] and [Out] parameters to pass to the VI is 28 or fewer, the translator places the local variable it creates for <Parameter>, <TestResult>, and <SessionDatum> elements 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, actionName_TestResults, or actionName_SessionData, respectively, 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.
ATML TD schema files define into TestStand and LabVIEW types. The following table shows how the translator translates simple types for <Parameter> and <TestResult> elements that the TestDescription.xsd and Common.xsd:
| TestDescription.xsd Type | Common.xsd Type | TestStand Type | LabVIEW Type |
|---|---|---|---|
| unsignedInteger | unsignedInteger | Number with unsigned integer format | Numeric |
| string | String | String | String |
| octal | Octal | Number with octal format | Numeric |
| integer | Integer | Number | Numeric |
| hexadecimal | Hexadecimal | Number with hexadecimal format | Numeric |
| double | Double | Number with double numeric format | Numeric |
| binary | Binary | Number with binary format | Numeric |
| boolean | Boolean | Boolean | Boolean |
For the strict ATML TD types the ATMLTDTypes and ATMLTD_IEEE1641_Types type palette files define, the translator passes each type as a container to the code module. The translator passes all other types as object references.
Related Information
- Creating LabVIEW Code Modules for Behavior Elements
- ATML TD Standards
- ATML TD Schema File Data Types - Using TestStand Type Palette Files with the TD Translator
- IEEE 1641 Specification Data Types - Using TestStand Type Palette Files with the TD Translator
- Using TestStand Type Palette Files with the TD Translator