LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

cluster as a input to subvi

Solved!
Go to solution

hello, 

I have cluster of string which is i want to give as input to one of the subvi.. is its possible to do so? 

thank you in advance 

0 Kudos
Message 1 of 17
(1,476 Views)
Solution
Accepted by topic author jeet4230

Any Control can be a sub-vi input and any Indicator can be a sub-vi output

 

  1. Place a Cluster control in your Sub-vi
  2. Use the connector pane to make that control as an input to your sub-vi 

 

Create and Configure a LabVIEW SubVI

========================
=== Engineer Ambiguously ===
========================
Message 2 of 17
(1,470 Views)

What if it is not in-line.

0 Kudos
Message 3 of 17
(1,462 Views)

@N_743 wrote:

What if it is not in-line.


 That has nothing to do with connecting a Cluster to the connector pane to be use as in input

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 4 of 17
(1,457 Views)

@N_743 wrote:

What if it is not in-line.


You need to explain what you mean by that. What is "it" (connector, subVI, control, etc.)?

 

Is it out-of-line? Not aligned? Not set to inlined? Something else?

0 Kudos
Message 5 of 17
(1,429 Views)

It = SubVI.

0 Kudos
Message 6 of 17
(1,413 Views)

We still don't know what ":in-line" means in your post and why you think it is a problem.

0 Kudos
Message 7 of 17
(1,406 Views)

@N_743 wrote:

It = SubVI.


You "Inline" a subvi to help improve execution speed, as I said it has nothing to do with connecting a Cluster Control to the Connector Pane to use as an input.

 

From LabVIEW Help: VI Execution Speed

 

A third way to minimize subVI overhead is to inline subVIs into their calling VIs. When you inline a subVI, LabVIEW inserts the compiled code of the subVI into the compiled code of the calling VI. If you then make changes to the subVI, LabVIEW recompiles all calling VIs of that subVI to include those changes. Essentially, inlining a subVI removes the need to call the subVI at run time. Instead, LabVIEW executes the subVI code inside the compiled code of the calling VI.

 

Inlining subVIs is most useful for small subVIs, subVIs within a loop, subVIs with unwired outputs, or subVIs you call only once. To inline a subVI, place a checkmark in the Inline subVI into calling VIs checkbox on the Execution page of the VI Properties dialog box. You must also select Preallocated clone reentrant execution on the same page of the dialog box. LabVIEW automatically preallocates clones for each instance when it inlines the subVI.

 

A subVI that you want to inline cannot have any of the following characteristics:

 

Contains recursion
Uses automatic error handling
Contains certain block diagram nodes, such as Property Nodes and Invoke Nodes. These nodes generate edit-time error messages if you enable subVI inlining.
Allows debugging. You must disable debugging for subVIs that you want to inline.
Is one of the following types of VIs:
Dynamic dispatch VI of a LabVIEW class
Targeted for CGen or FPGA
Control VI - VIs that define a custom control or indicator
Polymorphic VI
Global variable VI
XControl VI
Method VI of an XControl Library
VI that can only be placed on a simulation diagram in the LabVIEW Control Design and Simulation Module


Even if the subVI does not have any of the previous characteristics, LabVIEW does not inline the subVI into the following kinds of calls:

Dynamic calls to the subVI
Calls to the subVI that enable database access


Finally, when you inline a subVI, LabVIEW ignores any priority or preferred execution settings.

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 8 of 17
(1,405 Views)

Hi Altenbach,

 

I meant to say what if they are in different loops or cases and not in sequence (in-line) to each other. Language gap.

0 Kudos
Message 9 of 17
(1,375 Views)

Hi RTSLVU,

 

I apologize for throwing you off on a different tangent. It was a misunderstanding.

0 Kudos
Message 10 of 17
(1,371 Views)