LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I connect an XControl to my VI's connector pane?

Hi all,

 

LabVIEW lets me connect built-in controls to my connector pane, but won't let me connect an XControl. I'm puzzled -- isn't an XControl meant to behave like controls on steroids?

 

Is this possible to make that connection, without creating yet another type def?

 

Thanks!

Certified LabVIEW Developer
0 Kudos
Message 1 of 5
(2,753 Views)

Ah, of course... I can make a control directly out "MyXControl.xctl: Data.ctl"

 

It would still be nice to be able to connect the XControl directly

Certified LabVIEW Developer
0 Kudos
Message 2 of 5
(2,752 Views)

That makes sense.  The point of an XControl is to handle GUI.  So putting an XControl in a subVI that will never be seen doesn't make any sense.


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 3 of 5
(2,729 Views)

@crossrulz wrote:

That makes sense.  The point of an XControl is to handle GUI.  So putting an XControl in a subVI that will never be seen doesn't make any sense.


I agreed with this at first, but then I thought of reasons you would use an XControl in a subVI.  I can make an XControl with custom methods that perform some functions that are complicated.  Say I have a XControl that is an array of doubles, I could have a invoke node method, that performs a rate of change calculation, given a dt as my input.  In this simplistic example I would much rather have a subVI that I pass my data into, but I could see someone putting a bunch of functions in an XControl and then use its methods.

 

Another reason why you may want an XControl in a subVI is maybe the subVI will be shown, but you want to pass in the value to that control to a startup value.  So when the UI is shown by calling the subVI, the user sees it it has the starting value that maybe different from the default value..

Message 4 of 5
(2,715 Views)

Yes, Hooovahh pointed out some valid use cases.

 

Mine was this: My front panel has 4 instances of an XControl. The user can manipulate each independently, in any order. When the user clicks "continue", the data from all 4 XControls are to be passed into a subVI for a combined analysis.

 

My usual approach for creating subVIs that take custom datatypes is to right-click the output data wire, click "Create" -> "Control", then cut+paste the new object into a subVI. This works with "normal" controls (e.g. typedefs), but not with XControls.

Certified LabVIEW Developer
0 Kudos
Message 5 of 5
(2,696 Views)