LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

dynamic cluster in subvi connector pane

Solved!
Go to solution

Hello,

 

I would like to write a subvi that takes in a dynamic cluster, accesses its controls[ ] property and acts on the results.  I don't know if this can be done, or atleast have not thought of a viable option.  If anyone has any ideas I would like to hear them.  Let me know if I have not defined my problem well enough.

0 Kudos
Message 1 of 7
(3,371 Views)

jmcbee wrote:

Hello,

 

I would like to write a subvi that takes in a dynamic cluster, accesses its controls[ ] property and acts on the results.  I don't know if this can be done, or atleast have not thought of a viable option.  If anyone has any ideas I would like to hear them.  Let me know if I have not defined my problem well enough.


 

This Nugget  is probably not what you are asking.

 

Guessing at what you want have you concidered polymorphic that will adapt to the data type or LVOOP that will call the VI that is appropriate for your data type.

 

The Polymorphics determine the sub-VI called at edit time.

 

LVOOP determines the sub-VI at run-time.

 

Just throughing out ideas.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 2 of 7
(3,364 Views)
Solution
Accepted by topic author jon_mcbee

This is possible, make a 'Variant' type connector.

With the OpenG LVData toolset you can get all the info you need.

 

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
Message 3 of 7
(3,359 Views)

Ben,

 

I have considered polymorphic, but I want the subVI to be robust enough to handle any cluster with any number of and type of control inside it.  I dont know much about LVOOP but I am guessing that it will have a similar limitation as to the polymorphic route.  I was trying to figure out a way to do it with the variant data type but did not come up with anything clever.

0 Kudos
Message 4 of 7
(3,357 Views)
Thank you for the idea TonP.  I thought that the variant data type may bear fruit.  I will have a look and see what I can put together.
0 Kudos
Message 5 of 7
(3,356 Views)
Wow, that OpenG toolset is great!  Thank  you for pointing me in that direction!
0 Kudos
Message 6 of 7
(3,332 Views)

Here is the result of everyone's help.  This VI will take in a variant data type (to handle the dyamic cluster) and will return the control names and datatypes that make up that cluster.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Message Edited by jmcbee on 02-24-2009 09:57 AM
0 Kudos
Message 7 of 7
(3,301 Views)