Generating Complete Code Modules Using a Custom Code Generator

TestStand ATML Toolkit 2017 Help

Edition Date: June 2018

Part Number: 374205B-01

»View Product Info
Download Help (Windows Only)

The ATML TD translator translates an <Action> or <Test> element to a step in the translated TestStand sequence and translates the <Action> or <Test>/<Behavior> element as a LabVIEW or LabWindows/CVI code module for the step. Because the translator cannot translate all elements in a TD source file to constructs in TestStand or logic in code modules, the translator creates comments that describe the operations and logic you must implement to create a complete test program.

You can manually implement the operations and logic the comments in the code modules describe, or you can use the custom code generator callbacks during translation to programatically translate the code module comments to code that implements the logic required to complete the test program. The translator calls the callbacks when translating an <Action> or translating a <TestGroup> element. Use a custom code generator when you want to implement code only once in callbacks, which you can reuse when translating multiple TD instance documents, to avoid manually implementing the missing code for each TD instance document you translate. You can implement one or more callbacks in a custom code generator.

The translator calls the callbacks when creating and incrementally updating a sequence file. You can store a set of callback VIs in a single directory the translator references when creating the code modules, or you can build a DLL to store all the callback functions in a single file the translator references when creating the code modules.

Note Note  The translator ignores any errors that a custom code generator returns and continues to translate other elements. The translator records any errors that occur in the log file. If the translator calls Setup callbacks, the translator also calls the corresponding Cleanup callbacks regardless of whether the custom code generator returns an error during translation. The translator similarly calls the corresponding PostTranslate callbacks for any PreTranslate callbacks.


The ATML Toolkit includes custom code generator API classes, properties, methods, and enumerations you can use when implementing the code generator functionality.

See Also

<Action> Element

ATML Test Description Translator Configuration dialog box

<Behavior> Element

Code Generator Callbacks

Completing the Partial Test Program

Custom Code Generator API

Flow of Steps for Translating an <Action> Element

Flow of Steps for Translating a <TestGroup> Element

Incrementally Updating a Translated Sequence File

Logging Translation Information


Not Helpful