LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
vitoi

Allow easy access to top-level VI front panel controls and indicators in sub VIs

Status: Declined

Any idea that has received less than 4 kudos within 4 years after posting will be automatically declined.

What I find annoying, cumbersome and time consuming is when I want to take some code and "demote" it to a sub VI. If there are any top-lelvel (that is, user interface) front panel controls and indicators it becomes a nightmare. I know that references to the front panel controls and indicators can be used, but it's so much more work. So often, something which has grown that should be made into a sub VI remains at the top level.

 

Maybe I'm missing something here and there is some technical or useabiity issue.

 

Fundamentally what it is, is doing what passing a top level VI control/indicator reference to a sub VI and using the reference for control does, but behind the scenes.

17 Comments
vitoi
Active Participant

I hear about the UI thread swap penalty a lot. I wonder if something can be done about this. Something like writing any updates to a certain location (User Interface Status) and quickly returning to whatever was happening. Then a parallel task can scan the User Interface Status and make any required changes. I imagine that screen updates may be slighly delayed using this method (which should not be a problem since it's user information), but the main programme flow should hopefully be maintained without any performance hit.

 

Would be nice if the sort of performance workarounds that are done by experience LabVIEW progrmams could be done by LabVIEW itself.

SteenSchmidt
Trusted Enthusiast

Unrelated to this idea; The toolsets I've mentioned could be publically available. I'll look into submitting them somehow to ni.com, but I have a few issues I need to think about first.

 

More in the vein of the original idea; I also have another toolset (VIRegister) that's basically a named local without connection to any FP control or indicator, and with scope from Top-Level VI to down-most subVI (this is more to the point of what you're looking for?). Or you could call it a VI-hierarchy scoped global without a file, performing like a 1-element queue (well, it is a 1-element queue Smiley Wink)... I think I'll post a description of that toolset as an idea of an intra-process communication device. Stay tuned, it'll be a couple of days.

 

Cheers,

Steen

CLA, CTA, CLED & LabVIEW Champion
vitoi
Active Participant

Hi Steen. Personally, all I need is ready access to the top-level controls and indicators. That is, those on the user interface. Everything else can be handled relatively easy.

tst
Knight of NI Knight of NI
Knight of NI

Ignoring for a moment the other suggestions made here, and addressing mainly the ease of working with references - you can use something like this, which makes creating and passing the references very easy and readable, but I'll admit it's not easy for beginners and in its current form requires installing a significant add-on (the code could be adapted to work without the JKI RCF by being converted into a Quick Drop plugin or a floating tool or a Tools menu item, although I don't like any of those for something like this).


___________________
Try to take over the world!
vitoi
Active Participant

Thanks for that tst. An interim solution I'm thinking of implementing in my next project is to create a global variable with references to the user interface controls and indicators. This global would be loaded as part of initialisation. I could either populate the global variable with all the top-level VI control and indicator references or just add references as I need to use them. The global could be called User Interface References and I just pull off what I need when I need them. The I use property nodes (being careful to use "Create/Property for **** Class/Value" rather than "Create/Property Node/Value") whenever I want to read or write to the front panels. Appears to work well, takes up little space and is easy for beginners to understand. The only downside to globals that I'm aware of, race conditions, is not an issue with this usage.

 

Of course, my preference is for NI to have an integrated solutions, but judging form the level of kudos so far, I don;t think this idea will get the required attention.

SteenSchmidt
Trusted Enthusiast

Now the mentioned VIRegister toolset can be downloaded from Lava:

 

VIRegister toolset

 

Cheers,

Steen

CLA, CTA, CLED & LabVIEW Champion
Darren
Proven Zealot
Status changed to: Declined

Any idea that has received less than 4 kudos within 4 years after posting will be automatically declined.