LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

select property of a variable

 
 
Easier to see the image...  and the Edit time ran out 😞
Message 11 of 18
(10,156 Views)

Thanks Ben,

I'll have to browse through Darren's nuggets.. 😉
 
What I'm trying to avoid is have 60 or 70 "Unbundle by names" which take up almost as much room as the property nodes....  
Humm... 
 
Wait a minute...  I'm not sure I follow you.. 
 
What do you mean by: "I use an action engine that is initialized at start-up time by passing a cluster that has a reference to every control. The cluster passed in by the caller is then stored in a shift register for use later."
 
Is it a sub-vi that contains the cluster(s)?
And then another sub-vi to do this:  "Any time the visability of controls have to change, the action is invoked using approiatly named actions like "Show Config controls" or "Hide All", etc."
 
But I fail to understand the use of the shift register.    >> I really need that coffee, don't I? <<
 
Ray
0 Kudos
Message 12 of 18
(10,151 Views)

Hi Ray,

 

I THINK I heard him allude to it, but I do not remeber where.

Here are some screen shots of a "Visability Controller" that is a little more complicated that what I think you need. It allows for the user to "Back out" so it has to remember the previous state of the FP objects.

Here goes;

At start-up all of the control references are saved in a shift register.

When I have to change the visability, I can invoke one of the actions as shown below. (Please note the New User" tab is set visable).

This effectivelt moves all of the property nodes out of the main and into a single place and should make it easier to manage the screen state.

 

Let me now if you still need more help!

 

Ben

Message Edited by Ben on 09-06-2006 11:21 AM

Message Edited by Ben on 09-06-2006 11:21 AM

Message Edited by Ben on 09-06-2006 11:23 AM

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Download All
Message 13 of 18
(10,149 Views)

You just gave me an idea  😄 😄

I think I can make a modified version of this work.. 

=== dissappearing to the world of espresso before attempting a vi transformation surgery ===

 

Thanks Ben!

Ray

Message 14 of 18
(10,133 Views)

And just to add one small twist:

All those individual shift registers still occupy a lot of screen real estate while developing.  A possible alternative is to simply have one shift register with the array of control references.  For each of the action states, you'll need to have a method for identifying which indices to act on.  This becomes a new problem to solve, but one whose solution may be more compact visually.

Hard-coding the indices seems like asking for trouble.  I personally never show controls' captions, so I might embed some kind of grouping I.D. into the caption text of those controls.  Then the subvi containing the array of references can just loop through them while performing some string matching to determine which controls are 'eligible' for the specified action. 

Hmmm.  Still seems kinda clunky.  Still based on hard-coded info.  Sure seems like there ought to be a more elegant way to make this kind of group i.d., but I'm coming up blank.  (I'm assuming here the general case where the logical groupings can't map nicely into clusters, either because of front panel layout reasons or because some individual controls need membership in multiple groups.)

Good topic - I'd also be interested in approaches that lead to a fairly compact solution.

-Kevin P.

 

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
Message 15 of 18
(10,123 Views)

Kevin wrote "Still seems kinda clunky."

I agree!

But....

Let's put things in perspective. Before control reference were available we used to have to do this work in the GUI !

Compared to that, this appraoch make sthe GUI BD look elegant.

I too, would like to hear more voices share their wisdom on this topic!

Trying to push the LV envelope, one question at a time,

Ben

PS A more compact approach could use list of control names to show or hide depending on the requirements, BUT, that woudl make the code maintanence a text based chore and take all of the fun out of it. Smiley Wink

Message Edited by Ben on 09-06-2006 12:20 PM

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 16 of 18
(10,117 Views)
Guys,
 
I was thinking of a solution similar to Kevin's suggestion.  
Yep... the problem is to get away from hardcoding..  Working on it..
 
I didn't think I'd have to push the envelop to accomplish something seemingly simple (where's the crazy frog??  He's full of crazy -fantastic- ideas.. ) 😉
😄
Message 17 of 18
(10,109 Views)
In extension of Kevin's idea, here's a very quick example where there is a single SR with a typedef cluster holding arrays. Each array will be named and will hold a group, so each control can belong to several groups. Obviously, it can be developed further (like having the enum control just the group and using another value to control the actual value or using an array of enum to issue several command or using a variant input to be able to use different properties with different types of values).

___________________
Try to take over the world!
Message 18 of 18
(10,090 Views)