LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

type def and string

I created a type def out of a cluster.  One of the elements is a string control.  I hard coded in some string values ..ie Upper Limit...Nominal and Lower Limit.  I "applied changes" and "saved" the .ctrl file.  When I go to my vi and place the type def ctr on my front panel the string is empty.  if I re open the ctrl file the string values are still there.  They don't appear on my vi.  Can you NOT hard code in string values in a type def??  Is the string control just a place holder??

  I tried "Make current values default" and that didn't work.

Thanks..

0 Kudos
Message 1 of 7
(3,786 Views)

Have you tried making it a "Strict Type Def"?

0 Kudos
Message 2 of 7
(3,759 Views)

It worked for me.  I dropped down a Cluster, put in a Numeric and a String, set values for both, selected "Make Current Default", selected Make TypeDef, saw that the Default Values were in the TypeDef, saved the TypeDef.  Now when I add the Cluster to my block diagram using the TypeDef Control name, it comes with the Default Values for all the components.

 

Bob Schor

0 Kudos
Message 3 of 7
(3,754 Views)

P.S. -- I did not make this a Strict TypeDef, just an "ordinary" TypeDef.  Seems to me I've been doing this ever since LabVIEW 7.0 ...

 

BS

0 Kudos
Message 4 of 7
(3,751 Views)

So from your replies I'm not doing anything wrong.. Guess I'll have to troubleshoot it.  The only thing different from what you did to what I did is my cluster/type def already exsisted.  I opened it up "Open type def" place the string in the open type def...apply changes then closed it.  When I place the cluster/type def on my front panel the string is there but empty!!  When I go back to the type def its populated!!

0 Kudos
Message 5 of 7
(3,718 Views)

Thinking there was something wrong w my exsisting cluster/type def I created a new one...same thing!!  The string values exsist when I open the type def but when I place them on a new vi they're blank..  Am I missing a setting in Labview 2014??

0 Kudos
Message 6 of 7
(3,712 Views)

Did you remember to select: "Make Current Value Default" under the Advanced right-click option?

0 Kudos
Message 7 of 7
(3,684 Views)