LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Identifying datalog file with a custom control instead of constants

I am working on a program that uses several datalog files.  A cluster of constants and arrays of constants is used throughout the program to configure the datalog file (type connection).  When adding a field to the cluster I need to add this field to all of the constants as well.  I can not copy the constant cluster into a custom control since the custom control has no block diagram. 
 
Is there a better way to do this?  I'm guessing that if I build a cluster out of a custrom control of indicators that more memory/processor will be required to handl it, is this the case?
 
Thanks,

Dave
0 Kudos
Message 1 of 2
(2,106 Views)
Hello,
 
A type def is a great way to update something like that in multiple places - when you update the type def, it will automatically update in all places which it is used.  Further, you can use CONSTANT versions of your type def and they will ALSO update when you update your type def!!!  This way you can avoid the "front panel copy" of data which you seemed to be hesitant about regarding using controls and indicators.
 
Type defs are the way to go, and constants can be created from them.  Try a simple example - create a customer control (say a cluster with just a numeric) and save it.  Then open a VI, right click on the block diagram, choose "Select a VI...", choose your Type Def, drop it (it will be a constant version of your type def by defaul), and save the VI.  Now, open your type def and add, say, a string control to it and save it.  Now, take a look at your block diagram and notice that your constant (which remember is a type def) has updated!
 
Finally, notice that if you right click on a type def (any form, control, indicator, or constant) you have the option to "Auto-update From Type Def." - you'll want to keep this option checked, but it should be by default.
 
I hope this helps!
 
Best Regards,
 
JLS
 
PS - I presume you're working in an 8.x version of LabVIEW... there may be subtle differences in the implied directions above for 7.x versions... but try it out and I think you'll find this is the solution you're looking for!
Best,
JLS
Sixclear
0 Kudos
Message 2 of 2
(2,084 Views)