Getting Started with the ATML TD Translator

You can use the Open File dialog box in TestStand to browse for files with XML extensions, including valid ATML TD instance documents. When you open a TD instance document, the ATML TD translator translates the TD instance document to a partial test program, which includes a translated TestStand sequence file and a set of LabVIEW or LabWindows/CVI code modules.

Use the ATML Test Description Translator Configuration dialog box to configure the Application Development Environment (ADE) to use for generating the code modules. The translator creates VIs for LabVIEW code modules and creates a project file and a source file for LabWindows/CVI code modules.

The ATML Toolkit includes an example, located in the <TestStand Public>\Examples\Toolkits\ATMLTDTranslator\Translator directory, to help you begin using the TD translator.

Complete the following steps to translate the example to a partial test program.

  1. Create a directory named Examples on the desktop.
  2. Copy all files located in the <TestStand Public>\Examples\Toolkits\ATMLTDTranslator\Translator directory to the <Desktop>\Examples directory. You will use the copy of the files in the <Desktop>\Examples directory so that you do not modify the example in the <TestStand Public> directory.
  3. In TestStand, select Tools»Configure ATML TD Translator to launch the ATML Test Description Translator Configuration dialog box.
  4. Click the Code Module Settings tab and enable the LabVIEW or LabWindows/CVI option, depending on the ADE for which you want the translator to generate code modules. You can also use the controls available on the Code Module Settings tab to specify the file paths for saving the generated LabVIEW VIs or the file paths and names for saving the generated LabWindows/CVI project file, C source file, and DLL. In addition, you can use the controls on the Code Module Settings tab to specify a path to a directory that contains VIs or a path to a DLL that implements a LabVIEW or LabWindows/CVI custom code generator, respectively. Click OK to close the ATML Test Description Translator Configuration dialog box.
  5. Close all open sequence files.
  6. Select File»Open File to launch the Open File dialog box. Browse to <Desktop>\Examples\Translator\Computer.xml, which is an ATML TD instance document.
    Note If you attempt to open an XML file that is not formatted as an ATML TD instance document in TestStand, the translator returns an error that specifies that it does not support the file and TestStand returns an error that it does not have a sequence file translator that supports the file format.
  7. Click Open. The TD translator translates the TD instance document to a partial test program, which includes a TestStand sequence file and a set of LabVIEW or LabWindows/CVI code modules, depending on the ADE you selected in step 4. The translated sequence file contains a sequence named MainSequence that contains multiple steps.
To convert the example partial test program to a complete test program, replace all files in the <Desktop>\Examples\Translator\CodeModules_Computer directory with the files in the <Desktop>\Examples\Translator\CVI or <Desktop>\Examples\Translator\LabVIEW directory, depending on the ADE you selected and the file paths you specified in step 4.
Note The translator uses the same name as the source TD instance document for the new translated sequence file. If a sequence file with the same filename and file path already exists but the source TD instance document has changed since you previously translated it, the translator creates a new sequence file. If a sequence file with the same filename and file path already exists and the source TD instance document has not changed since you previously translated it, the translator does not translate the source TD instance document but opens the existing sequence file instead. Enable the Add Date and Time to File Name option on the Generated Sequence File Settings tab of the ATML Test Description Translator Configuration dialog box to append a date-time string to the target sequence filename to make the sequence filename unique for each translation

Incrementally Updating a Previously Translated Test Program

If you make changes to the source TD instance document and you want to reflect the changes in the translated sequence file and code modules, you can incrementally update the sequence file and code modules instead of creating an entirely new test program.

Complete the following steps to incrementally update a previously translated partial test program.

  1. Select Tools»Configure ATML TD Translator to launch the ATML Test Description Translator Configuration dialog box.
  2. Click the General Settings tab and enable the Update Sequence File option. Click OK to close the ATML Test Description Translator Configuration dialog box.
  3. Close all open sequence files.
  4. Select File»Open File to launch the Open File dialog box. Browse to <Desktop>\Examples\Translator\Computer - Update.xml, which is an ATML TD instance document.
  5. Click Open. The Update Options dialog box launches.
  6. Enable the Use the Selected File to Update option and click the Browse button to select the Computer.seq sequence file you created in the previous tutorial. The translator updates the existing sequence file and the LabVIEW or LabWindows/CVI code modules it had previously created.