NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Defining TestStand functions in an ATML TestDescription

Hello,

 

I am currently trying to execute test cases in NI TestStand using the ATML Toolkit 2010. So far, I have managed to import the test cases as simple steps into NI TestStand. My Question is whether it is possible to somehow execute bits of code embedded in the test cases within TestStand. E.g. a test case sets a certain variable or executes a loop, etc.

 

However, i couldn't find any examples on how to do this. I have looked into the Computer.xml example provided with the Toolkit, but i am not sure this is what i am looking for.

 

Any help or maybe just a simple example on how to do this in the .xml file imported into TestStand would be greatly appreciated.

 

Thanks,

Fabian

0 Kudos
Message 1 of 4
(3,756 Views)

Hello Fabian,

 

you can look into the Help for the ATML toolkit, there should be an example to generate code from a read ATML file.

During generating the code it should be also possible to generate variables with the TS API functions. 

 

Example LabVIEW Custom Code Generator VIs

 

Use the example VIs located in the <TestStand Public>\Components\Translators\ATMLTDTranslator\Examples\Code Generator\LabVIEW directory as a starting point for implementing a VI that calls a specific code generator callback. Refer to the individual callback topics for more information about the example VI for each callback, including the controls and indicators you must connect to the VI connector pane.

Complete the following steps to use the example VIs to generate complete LabVIEW code modules for the translated sequence.

 

  1. In TestStand, select Tools»Configure ATML TD Translator to launch the ATML Test Description Translator Configurationdialog box.
  2. Click the Code Module Settings tab and enable the LabVIEWoption.
  3. Click the Browse button next to the Directory that Contains the Custom Code Generator VIs control and browse to <TestStand Public>\Components\Translators\ATMLTDTranslator\Examples\Code Generator\LabVIEW.
  4. Click OKto close the ATML Test Description Translator Configuration dialog box.
  5. Close all open sequence files.
  6. In TestStand, select File»Open Fileto launch the File Open dialog box.
  7. Browse to <TestStand Public>\Components\Translators\ATMLTDTranslator\Examples\Translator\Computer.xml.
  8. Click Opento translate the TD file to a TestStand sequence file and a set of LabVIEW code modules.
  9. Review the translated sequence file and the generated code modules.

I hope this helps.

best regards
Alexander
0 Kudos
Message 2 of 4
(3,662 Views)

Hello Fabian,

 

additionally informations

 

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

 

and yes the Computer.xml shows the correct behaviour you want.

best regards
Alexander
0 Kudos
Message 3 of 4
(3,654 Views)

You can achieve this by using existing TestStand step type like Statement. To use the Statement step in Test Description file, create an Action element having customType attribute as "Statement" (the name of the TestStand step type). ATML Toolkit 2010 translates the Action step as a Statement step in the sequence file. You can use the Custom Code Generator to update the contents of the TestStand step created for the Action element.

 

Thanks,

Shashi

0 Kudos
Message 4 of 4
(3,622 Views)