09-16-2008 11:54 AM - edited 09-16-2008 11:55 AM
Hello,
I am trying to write a program that uses a rather large amount of front panel controls and indicators. I am using an ENUM control to allow the user to select what product they are using. Depending on the product they select, property nodes are used (specifically the visible and caption.text properties) to change the name of the controls/indicators and hide the ones that will be inactive.
My question is, will there be a performance hit with using too many property nodes? Also, is there a way to create a subvi program to write the code involving the property nodes? So far I haven't been able to find a way to access property nodes of the main program through a subvi. I would like to avoid changing the properties of each control/indicator on the main program to save space. Perhaps there is a better, more efficient way to do this? Thanks!
09-16-2008 12:18 PM
It is OK to use properiy nodes in an event that only executes when needed. Still, there are probably better ways to do all this.
Can you attach some real code?
09-17-2008 12:41 PM
09-17-2008 02:09 PM - edited 09-17-2008 02:11 PM
First of all, you need to eliminate all these unneeded sequence structures and remove all the duplicate code. All that differs between your caseas are a few values, so everything else belongs outside the case structure. Here's a quick draft of the idea.
To do things in subVIs you would create references to the FP objects and feed those to the subVI, together with the desired settings. In the subVI, you would use plain property nodes containing a reference input. You can easily loop over all corresponding controls by making an array of references and autoindexing into a FOR loop. This is more flexible and adding new controls is a simple as growing the reference array.