LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Stand Alone Control

Solved!
Go to solution

@seascan wrote:

Tim,

 

That is exactly what I want to do but when I try to create the subVI, it bundles everything except the visual controls.  Is there a way to create a subVI with the associated visuals?  Here are the before and after screen grabs:

 

 

 



I don't understand your question.

 

If you look in the subVI you created, you will see the controls are inside of there.  You will have 2 controls called upper current and lower current.  And 3 indicators that are probably called Upper (psi), Lower (psi), and 7PW.

0 Kudos
Message 11 of 16
(677 Views)

I concur that they are in the Front Panel of the SubVI but I need to see them in the VI where I have the 50 instances.  The only way I have figured out how to do this is by wiring the outputs of the SubVI to three controls in the VI.

 

I hope this makes more sense...

0 Kudos
Message 12 of 16
(675 Views)

If you are dealing with 50 instances of something, then you really should be thinking of an array.  That way you can iterate through them in a loop.  Exactly what is different from each other in these 50 instances?

 

If you are dealing with 3 different controls or indicators that are related to each other, then you should be thinking cluster.

 

Since you are looking at 50 instances of 3 different indicators, then you should be thinking an array of clusters.

 

But this is basically the same thing Gerd was saying.  And Tim had good comments as well.

 

 

Message 13 of 16
(671 Views)

Thank you all for your input.  You have converted this heathen into a Cluster Array believer!  I really am impressed at the level of interest on this forum and hope to be able to contribute in the future as I gain more experience.

 

One more question:  Below is a 2D array of clustered indicators (6 elements by 4 elements)

Array1.png

 

As you can see, 1 row and column is un-initalized.  I am using a zero based iterator as show in this block diagram:

 

Array2.png

 

When I change these to 4 and 6 respectively, the code works fine... but is this not "1" based and not "0" based?

 

Thank you again,

terry

0 Kudos
Message 14 of 16
(657 Views)
Solution
Accepted by seascan

The N terminal of the for loop tells the loop how many times to run.  So N=5 means run the loop 5 times.  However the index numbers are zero based.  So a loop that runs 5 times with auto-indexing turned on will create a 5 element array whose indices are 0, 1, 2, 3, 4.

 

You should run a block diagram cleanup on your code.  If not, at least put the Cluster array indicator on the right side of your screen and move the tunnels to the right side of the loop.  Right now it appears that your indicator is a Source of data and is confusing until you take a close look at the arrows on the indicator terminal and see what directions the wires flow.  Right now your wire is flowing from right to left which looks backwards.  Wiring should be run from left to right so it is obvious which direction the data flows.

0 Kudos
Message 15 of 16
(633 Views)

Ravens Fan,

 

Great call about the code clean-up... most excellent tool!

 

Understood about the indexing.  Thank you!

0 Kudos
Message 16 of 16
(630 Views)