LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Out of Input/Output Terminal Space, Possible to Group Inputs as Cluster?

I have a SubVI in my MainVI that  has all input/output terminals occupied (28 terminals). I want to add more inputs to this SubVI but don't have anymore open terminals. How do I do this?

                      

I tried to create a Cluster of few variables, and then I put that cluster into the input terminal of the SubVI, however, I don't understand how to take a cluster as an input in the SubVI and unbundle it into individual variables. When I try to do it, it gives me error. It says the input cluster has X elements (ex: 5 elements), and the cluster in my SubVI has 0 elements.

 

Is there a more efficient way to pass the inputs to the SubVI instead of connecting each variables to the SubVI's terminal?

 

Ex:
- Main VI has variables (Double): A, B, C, etc...

- Variables A, B,C, etc... are inputs to SubVI

- Main VI calls the SubVI continuously in a for loop until a certain condition is met

 

Requirements: While the program is running, I should be able to change the value of the variable from the MainVI and have that new updated variable reflect during the execution of the SubVI. This means, during N iteration of the SubVI, A could be = 25, however, I should be able to change A to 33, so that during the N+1 iteration of the SubVI, input to A = 33.

 

0 Kudos
Message 1 of 6
(2,586 Views)

I would recommend looking at the online LabVIEW tutorials
LabVIEW Introduction Course - Three Hours
LabVIEW Introduction Course - Six Hours

0 Kudos
Message 2 of 6
(2,579 Views)

See my program attached.

 

Varibles are bundled into a cluster which is an input to a SubVI

The SubVI is continously executed in the for loop for 100 times

 

When you run the cMain, the variable values are passedi nto the subVI, however, if I were to change the varibles while the program is running, the updated varibles are not being updated in the cluster, thus the subVI doens't receive the new updated variables as inputs.

Download All
0 Kudos
Message 3 of 6
(2,541 Views)

Data flow.  If you move the terminals inside of the FOR loop, then they were update the cluster since they are actually being read each iteration.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 6
(2,534 Views)

Okay, now I understand. Thanks. Attached are the files where I fixed the issue.

 

I have a follow up question:

 

If required, is it okay to connect a local varible to the "Unbudle" output instead of the connecting the terminal directly? See cSub.vi for what I mean.

Download All
0 Kudos
Message 5 of 6
(2,511 Views)

@aab-ufl wrote:

If required, is it okay to connect a local varible to the "Unbudle" output instead of the connecting the terminal directly?


For what reason?  That sounds more like an architectural issue.  And for that, we would need to know a lot more about what you are trying to do.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 6 of 6
(2,491 Views)