NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How do use Custom Data Types with MyTypes.ini

I have a test application that uses a custom data type.  It is defined as a container, type definition.  I need to add a several fields to the defined array.  There are other applications that do not need the new fields and will not work if they are included.  I wanted to select the definition using MyTypes.ini and load in the desired definition depending on the application that I'm using.  I have tried to modify the MyTypes file and tried to start Testand with the with the modified definitions but it does not load the correct information.

 

Thank you,

Al Campagna

 

Please use email: campagnaab@yahoo.com

0 Kudos
Message 1 of 2
(3,009 Views)

Hello Algebra,

 

The easiest solution is to create two diffent types and choose the appropriate type when identifying the input or output parameters to your code modules.

 

The alternative is a bit hairy.  I would image that you would have to create a SequenceFilePreStep engine callback.  This call back will execute before every step within your sequence, and it will need to be customized to check that the correct type is used and modify the type if necessary.  You will have to create a file that has the names of each module and the name of the correct type that functions with it.  As well, you will have to have a collection of parameters with one type (I would place them in a container and call it group A) and a collection of parameters of the second type (group B). Within this engine callback, you would have to write expressions to determine a few things:

 

  1. Does the step point towards a code module?
  2. If so, check which type that particular module needs (by checking the list previously mentioned)
  3. Modify the input/output parameter to the correct type from either container (group A or group B)

The alternative will require use of the teststand API.  For help doing this I would refer to the NI TestStand Help article titled TestStand API Reference" or the TestStand API Reference Poster.  There are also shipping examples available with an installation of TestStand and community code available at ni.com/zone.

 

 

 

Regards,

Shawn S. | NIC
Instrument Driver/IVI PSE
National Instruments
0 Kudos
Message 2 of 2
(2,956 Views)