LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Adding or removing an element from strict typ def cluster changes cluster default?

Solved!
Go to solution

Hi All,

 

I have a big strict typ def cluster.  I put it into a vi with all default values.  The problem is, whenever I add or remove an element from the strict typ def, I find the cluster default values change, they are all shifted.

 

Anyway to solve this problem?

 

Thanks for any help.

 

Anne 

0 Kudos
Message 1 of 10
(3,043 Views)
Can you explain what you mean by "shifted"? Can you attach the type definition?
0 Kudos
Message 2 of 10
(3,039 Views)

I made the suggestion of using a sub-VI to define default values in my Type Def Nugget as illustrated with this image.

 

 

LVOOP offer the ability to define the defauly values if you really want to avoid using a sub-VI.

 

Thoughts on what I suspect is happening:

 

IN a Strict type def the look is completely governed by the definition but the DATA is NOT! When type defs are updated the old version is complete removed and the new one is used in its place. So the data is not part of the type def. (except in LVOOP).

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 3 of 10
(3,026 Views)
0 Kudos
Message 4 of 10
(3,024 Views)
Solution
Accepted by topic author Anne Zuo
Could you attach the "ctl" instead? Also, what's your LabVIEW version?
Message 6 of 10
(3,004 Views)

sure. here is the strict typ def control.  My labview is 8.5.

 

Thank.

 

 

0 Kudos
Message 7 of 10
(2,989 Views)
I cannot reproduce the problem in LabVIEW 8.5.1 and 8.6.
Message 8 of 10
(2,985 Views)

How comes?  My labview is 8.5.1.   Maybe you did it in a wrong way.  The screen copy in doc file shows you the steps.

 

 

I guess Ben is right.  Data type is part of the typ def, but not values.  He suggests to use subvi and bundle in names to define default values.  It woks that way.  The problem is:

 

*  I have too many big typ def.  If use subvi and bundle by names to define default value, it will take a lot of time.

 

*  even that way, if I remove one element from the typ def, the subvi for default value will be broken.

 

 

Thanks any way.

 

 

 

 

0 Kudos
Message 9 of 10
(2,978 Views)

Anne Zuo wrote:

How comes?  My labview is 8.5.1.   Maybe you did it in a wrong way.  The screen copy in doc file shows you the steps.


Well, there is no "wrong way" because you did not relly provide detailed step-by-step instructions. 😉

 

Still, after a bit of playing around, I was able to reproduce some anomaly similar to what you describe so maybe there is some problem.

0 Kudos
Message 10 of 10
(2,953 Views)