NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

TestStand Custom Type

Hello,

 

During a development of a test sequence, since I need to pass from different sequences the same set of parameters that I gathered in a container. Because this set of variables is used in other part of my test sequence, I decided to create a Custom data Type that is a container with the fields that I need.

 

The problem is that when I observe the parameters of a sequence calls that use my custom type, I don’t have the possibility to expand and fill one by one the fields in the container.

 

I read in some post that you have to create both the custom variable in both the sequence files and in the Type Palettes (file MyTypes.ini), but it doesn’t work, why?

 

Are there other method to achive my goal?

 

Thank you very much for the help!

 

Best Regards,

Michele

0 Kudos
Message 1 of 4
(2,233 Views)

I'm not sure if I understand the problem. To me, it looks like you misunderstand how custom data type works in TestStand. So, let me explain step by step how to create a custom data type and then use it in multiple sequences to make sure that each of them uses the same data structure. Keep in mind that it can be done in different ways and I will show only one solution.

 

  1. Go to menu View >> Types (ctrl + T).
  2. Select MyTypes.ini.
  3. Right-click in the Custom Data Types section and insert a container. You can rename this data type to "MyType".
  4. Right-click "MyType" and insert number, boolean, and string.
  5. Now you can save your custom data type in MyTypes.ini (ctrl + S).
  6. In your sequence right-click locals and select Insert Locals >> Type >> MyType.

 

Now you should have your custom data type in your local variables. If you copy this variable and paste it into other sequences you should always see the structure defined in MyTypes.ini (you can check your variable type - it is displayed in "type" column in the Variables Pane). After you copy MyType to all your sequence files you can also check in Types (ctrl + T) that MyType is visible in Custom Data Type section in all your sequence files however, the icon shall be different. In MyTypes.ini MyType icon will have a small plus sign, but in sequence files, you will not see it. The plus sign indicates where the type is defined, if you don't see this sign it means that the files only use this type but the definition is somewhere else.

 

Alternatively, you can repeat this procedure but instead of using *.ini to save your type, you can use a sequence file. There are other nuances when it comes to data types but let's start with the basics.

Let me know if that helped.

Michał Bieńkowski
CLA, CTA, CPI

  1. Did someone devote their time to help solve your problem? Appreciate it and give kudos.
  2. Problem solved? Accept as a solution so that others can find it faster in the future.
  3. Contribute to the development of TestStand by voting on the TestStand Idea Exchange.
Message 2 of 4
(2,207 Views)

Thank you for the answer,

 

First of all, I want to ask you an explanation: what is the difference of creating the custom data type in the MyType.ini instead of using the Sequence File?

 

Then for what concern my problem I try to be more detailed. The steps that you described in your message were the same that I have used before my question on the community. My issue arises when I use the Custom type creating the variable in the Parameters section in the Variables Pane of a sequence.

When I make a sequence call and I pass to it the value of parameters requested, I can’t open the container as usual. I attach a screenshot for show you what I mean. As you can see in the Step Setting Pane, I can’t expand the container fields to fill each one with a value.

 

I hope to have been as thorough as possible in explaining my problem, and I ask you sorry if I didn’t understand something of your message.

 

Thank you for your advices!

Best regards,

Michele

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

Hello Michele,

 

Container parameters do not show up as expandable in the sequence call module parameters (whether they are custom data-types or not).  I think you're thinking of the expand/collapse behavior you see when calling LabVIEW module cluster parameters (shown below).

CreationKen_0-1638374957347.png

 

Unfortunately, Sequence module parameters don't behave in this same way, so you'll need to create a local variable of the same data-type and pre-populate it before calling your sequence.

CreationKen_1-1638375100313.png

 

I hope this helps.

 

Ken M.

 

0 Kudos
Message 4 of 4
(2,095 Views)