Creating LabWindows/CVI Code Modules for <Behavior> Elements
- Updated2023-02-21
- 4 minute(s) read
The ATML TD translator creates a LabWindows/CVI project using the path you specified in the LabWindows/CVI Project File Path control on the Code Module Settings tab of the ATML Test Description Translator Configuration dialog box and adds the generated source file, header file, and default TestStand instrument files to the project. The translator configures the paths of the LabWindows/CVI project file, source file, and the DLL as relative paths in the generated TestStand step.
The translator creates a LabWindows/CVI source file, creates a function for each <Action> parent element, names the function using the name attribute of the <Action> element, and inserts the function in the LabWindows/CVI code module. The translator then creates comments that begin with the string <ATMLTranslatorComment> for the <AutomaticGeneration>, <Description>, <Extension>, <IeeeStd1641>, or <Operations> child elements of the <Behavior> element and adds the comments to the function.
![]() |
Completing the Partial Test Program You must manually implement the logic that the <AutomaticGeneration>, <Description>, <Extension>, <IeeeStd1641>, and <Operations> elements describe. Refer to the post-translation recommended actions section of the log file for more information about the elements you must implement. |
The translator configures the path of the DLL project to be relative to the sequence file. The translator passes all the <Parameters>, <TestResults>, and <SessionData> elements of the corresponding <Action> element to the function.
The translator passes parameters as local variables or as a single container to the LabWindows/CVI code module.
![]() |
Note The translator does not build the LabWindows/CVI code module project. You must manually build the LabWindows/CVI project and generate the DLL before you run the sequence file. |
![]() |
Caution The translator opens LabWindows/CVI to generate code as the translation progresses. Closing LabWindows/CVI while translating a TD instance document can cause the translator to stop translation. |
If a source file already exists at the path you specified and the file contains a function with a name that matches the value of the name attribute of the parent <Action> element, the translator updates existing comments in the function. If the function does not exist, the translator creates a new source file.
![]() |
Incremental Update The translator incrementally updates existing comments that correspond to the <AutomaticGeneration>, <Description>, <Extension>, <IeeeStd1641>, and <Operations> child elements of the <Behavior> element, as the following table describes.
|
See Also
ATML Test Description Translator Configuration dialog box
Logging Translation Information
Passing Parameters to LabWindows/CVI Code Modules