NI TestStand Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
0 Kudos
nclark

Override a Type Def to Cluster Pass - LabVIEW Action Steps

Status: New

I'm working extensively with LabVIEW VIs and Test Stand, and one of the most helpful features existing is the ability to configure a TestStand type to pass its data to and from a LabVIEW Cluster.

 

I think a great way to expand upon this would be to allow the developer to override specific variables within the LabVIEW cluster.

 

For instance, say I have defined a TestStand type with 5 total variables, all of which may pass to a LabVIEW cluster. If my LabVIEW cluster has at least the same number and type of variables, then this cluster passing has no issue.

 

However, if my LabVIEW cluster has 6 variables, then the TestStand type can only account for its defined five variables, and I am effectively locked out from the sixth variable. I cannot edit the sixth variable, nor can I assign it a default value (see Ex1_broken.PNG)

 

This wouldn't cause an issue if I could override specific variables within the cluster passing. That is to say, if I were given access to that sixth variable from the example, then I could assign it to a local variable. The other five variables would still be satisfied by the TestStand type, and no errors should be generated by the step. (see Ex1_fixed.PNG for what I envision this to look like)

2 Comments
TomOrr0W
Member

If you need to pass a mismatched cluster or only part of a cluster, you can just specify the cluster element by element.  This would be identical to your Ex1_fixed and Ex2_fixed except that the Example 1/Example 2 value would be blank.

 

Your method will also get somewhat less intuitive if you are trying to pass members of multiple clusters into one cluster (i.e. two 3-element clusters).

In LabVIEW, you would have to do something similar to the current TestStand behavior - unbundle the mismatched cluster and then bundle new values into a subVI cluster.

nclark
Member

Element by element does work, and I have done that. It just gets tedious when clusters get large, and there's also the added risk of accidentally passing the wrong thing into the wrong slot, which I've done many a time.

 

I think that having the ability to override cluster elements at will would be a nice option to have for cases where individually defining each element one line at a time becomes clunky and dangerous. I would definitely consider this a 'use at your own risk' type deal, though.

 

PS. Didn't even consider the possibility of passing more than one cluster into the top level, but I'm gonna say that while it may lower readability of the top level line, it would probably increase readability of each proceeding element line. I don't know... I think personally this would be a feature that I would use, but I also understand if its not to some other people's tastes.