NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to update the existing type definition for a cluster containing an enum type definition from a LabVIEW code module

Solved!
Go to solution

Hi, I found some strange behavior in TestStand. It is as described in known issues https://www.ni.com/pl-pl/support/documentation/bugs/19/teststand-2019-known-issues.html#662205_by_Ca... but not for the array of clusters but just for clusters.

So, I have a problem to update the container type definition containing enum type definition in TestStand.

The example is as follows:

  • Create a sequence file with a LabVIEW call.
  • Called VI will have a cluster containing numeric, string and typedef enum.
  • Create a type definition for this cluster in TestStand by clicking on Create/Update Custom Datat Type... button in the type column for the code module parameter.
  • 2020-04-16 10_14_38-Window.png
  • Create a new parameter with the newly created type.

Now all is working as it is in attached EnumUpdateBug_1.seq. We have 2 new type definitions in TestStand: one for cluster and one for enum.

 

Next, try to update the enum definition in LabVIEW and later in TestStand.

  • Change LabVIEW enum type definition - e.g. change one item text (see EnumUpdateBug_2.seq).
  • Then, in TestStand you will see the red exclamation mark because you changed the VI. Click on it and let TestStand accept the fact.
  • We don't see any issues at first glance, but then if we check enum in our parameters we can see that we don't have the same enum that we have in LabVIEW. If we click to check expression (red checkmark) where our parameter is used in the code module we see "no errors". But when we click Create/Update Custom Datat Type... button again. Then we see that we have a mismatch. It suggests using a new data type for our enum - it doesn't want to automatically link it with our enum typedef...
  • 2020-04-16 10_28_32-Window.png

We need to uncheck "Force Exact Match" and manually select types...

2020-04-16 10_30_20-Window.png

After we click Update we don't see any changes. Our updated type definition remains the same - enum looks like it was before, no update. Our LabVIEW call seems to be ok (no red marks of any sort) but if we look closer we can see the message...

2020-04-16 10_32_47-Window.png

 

To me, it looks like the bug described in know issues but just with clusters. The suggested workaround is not really helpful if you need to manually update the type everywhere...

Michał Bieńkowski
CLA, CTA

Someone devote his time to help solve your problem? Appreciate it and give kudos. Problem solved? Accept as a solution so that others can find it faster in the future.
Make a contribution to the development of TestStand - vote on TestStand Idea Exchange.
0 Kudos
Message 1 of 5
(2,505 Views)

Could any NI employee respond to this topic? This problem makes my job very difficult.

Michał Bieńkowski
CLA, CTA

Someone devote his time to help solve your problem? Appreciate it and give kudos. Problem solved? Accept as a solution so that others can find it faster in the future.
Make a contribution to the development of TestStand - vote on TestStand Idea Exchange.
0 Kudos
Message 2 of 5
(2,400 Views)
Solution
Accepted by topic author bienieck

Hi Michał,

 

This issue has been fixed in TestStand 2020, which will be the next version to be released later this year.

 

Since you are on an older version, you will have to use a workaround. You've mentioned that updating the type manually is difficult. Is this because you have the same type defined in multiple sequence/type palette files? Otherwise, you only need to manually update the type definition of the enum once and the changes should reflect in all instances of the type.

 

If you do have the same type definition saved in multiple sequence files, then consider moving it to a common type palette file and removing it from all other places. Then you'll only need to update the type definition in one place.

 

Regards,

Tinu

Message 3 of 5
(2,380 Views)

I also wanted to add that you can use the Create/Update Custom Data Type From Enum dialog to automatically update the Enum type definition instead of doing it manually.

 

 

TRJ_2-1589260489607.png

 

You can do this by expanding the cluster and hitting the button present in the Type column of the enum parameter (highlighted in the image above). In the dialog that comes up, choose the Update tab and the existing enum type definition to update in the combo-box.

 

Hope this helps.

 

Regards,

Tinu

 

0 Kudos
Message 4 of 5
(2,357 Views)

Thank you TRJ. I dealt with my issue this way: I have this cluster typedef with enum typdef. No mater what I tried Update Custom Data Type feature always wanted from me to create new enum typdef in TestStand. So, I let the updater to create one and later I just needed to do some manual work with removing the old enum typdef and renaming the new one (used in the cluster). It's not ideal but it works.

Michał Bieńkowski
CLA, CTA

Someone devote his time to help solve your problem? Appreciate it and give kudos. Problem solved? Accept as a solution so that others can find it faster in the future.
Make a contribution to the development of TestStand - vote on TestStand Idea Exchange.
0 Kudos
Message 5 of 5
(2,342 Views)