LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

manipulating elements in a cluster and passing to subVI and back again

I have done some searching to see if there was already a question like this, but I didn't see one.  If there are others that are similar enough point me there, or tell me to keep looking. (Don't do that Smiley Happy )   Otherwise, thanks for reading.

 

Background:  I am maintaining VIs written in LV 8.0.  I am working with a Strict Type Def, which is a cluster, with some ring elements, numeric, and boolean elements, totaling 21 different elements.  In the main VI, there is an event structure.  In different events, different elements of the cluster are disabled.  In some of the events, I want to call another VI with the Strict Type Def.  The new VI will need to have the appropriate elements in the cluster disabled.  There is a possibility of some elements changing these or other properties that need to be passed up to the calling VI. 

 

So the question:  Is there an easy way to pass the properties of the elements in the cluster other than passing each property separately or in a cluster?  It might not just be one property per element either.

 

Thanks in advance.

 

brian

0 Kudos
Message 1 of 4
(2,631 Views)

For complicated GUIs I use anAction Engine designed for the app.

 

In the "init" action I cache the control refs I will use during the run.

 

 

When it comes time to change how thing look I invoke the appropriate action and set all of the properties inside the AE.

 

 

 

In your case you laso ahve to cache the ref to the sub-VI's control but the idea is the same. Just do the same thing to both and you should be OK. You COULD cache all of the cahnges and then apply them latter but that complicates things.

 

I hope that helps,

 

Ben

 

 

Message Edited by Ben on 04-27-2009 11:11 AM
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Download All
Message 2 of 4
(2,621 Views)

Ben,

 

I was hoping for something a little easier, but not counting on it.  Let me digest this for a little while, and if I have more questions, I will get back to you.

 

Thanks,

Brian

0 Kudos
Message 3 of 4
(2,611 Views)

bjstaff wrote:

Ben,

 

I was hoping for something a little easier, but not counting on it.  Let me digest this for a little while, and if I have more questions, I will get back to you.

 

Thanks,

Brian


 

I'd like yo hear about an easier method myself. 

 

Here is another way you could do it (but the former method is easier to follow).

 

You could use a ref from both type defs and iterate through each element and match up the properties of one with the other. This Nugget illstrates how to get at sub-elements of complex clusters. Please note that Nugget focused on the data while you are interested in the properties so that Nugget is for inspiration only.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 4 of 4
(2,602 Views)