NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to write custeom code generator callbacks in labview and use in the Teststand ATML toolkit

Hi all

I try to use ATML toolkit to generate an ATML file to a teststand sequence file. According to NI TestStand ATML toolkit help document, the <Action>/<Behavior>/ elements in the ATML file will be converted to comments in the Labview, unless use the custom code generator callbacks to automatic translate the <Action>/<Behavior>/ elements (for example <OperationConnect> or <OperationRead>) to LabView modules.

 

Can any one explain to me how to write custom code generator callbacks, and better with examples?

 

 

Thanks

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

How to write custom code generator in LabVIEW :

 

TestStand ATML Toolkit ships an example for custom code generator and will be present under <TestStand Public>\Components\Translators\ATMLTDTranslator\Examples\Code Generator\LabVIEW directory. All VIs present in the directory whose name starts with "CodeGenerator_" is a custom code generator callback VI and will be used by TestStand ATML Toolkit. The example custom code generator VIs translate <OperationConnect> and <OperationRead> elements to LabVIEW code modules. You can use the example VIs as starting point for implementing the custom code generator.

 

How to use the custom code generator in TestStand ATML Toolkit:

 

In TestStand select "Configure >> Configure ATML TD Translator" to launch the ATML Test Description Translator Configuration dialog. Click on Code Module Settings tab and enable the LabVIEW option. Specify the path of the directory containing custom code generator VIs for "Directory that Contains the Custom Code Generator VIs" control.

 

Thanks,

Shashidhar

0 Kudos
Message 2 of 4
(3,113 Views)

Hi Shashidhar

 

Thanks for your replying.

I checked the example you mentioned in the <TestStand Public>\Components\Translators\ATMLTDTranslator\Examples\Code Generator\LabVIEW directory. It doesn’t help me a lot. For example inside the OperationConnect.vi, it includes a signal controller and the Error In controller is connected to the Error Out.  I still don’t know how to start with it.

 

To make my question more clear, can you answer my following question.

 

In the NI TestStand ATML Toolkits Help document, section Getting Started with the ATML TD Translator, it has an example, which partially translate the “computer.xml” to Labview VIs and TestStand sequence file. The help document says “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\LabVIEW directory”. I assume the files in the <Desktop>\Examples\Translator\LabVIEW directory are generated by custom code generator callbacks. But I don’t think those callbacks are the same as them in the <TestStand Public>\Components\Translators\ATMLTDTranslator\Examples\Code Generator\LabVIEW directory.

Can you send me those custom code generator callbacks which generate complete “computer.xml” example? Or explain to me how to implement callbacks for this particular example.

 

Thanks

Luc

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

Hi Luc,

 

Have you followed the instructions in the Implementing a LabVIEW Custom Code Generator topic in the help?

 

http://zone.ni.com/reference/en-XX/help/372921B-01/tsathelp/infotopics/custom_code_labview/

 

Other related topics that may be of help:

 

Example LabVIEW Custom Code Generator VIs

Creating a VI for a LabVIEW Custom Code Generator

 

Is there anything in the existing documentation that you've read that can be improved? If so, how?

 

Tom
TestStand Documentation
0 Kudos
Message 4 of 4
(3,080 Views)