LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Main Front Panel Cluster reference in Sub VI

Solved!
Go to solution

Using typedef's can help prevent a lot of mismatch problems.

 

But now that I can play with your VI's, the easiest way to have fixed the problem was to make a constant of the new cluster datatype.  Then drag and drop that onto the control reference icon that is on the front panel of the subVI.  That changes the class of the control reference control and fixes the wires.

0 Kudos
Message 11 of 18
(1,712 Views)

I tried your example, made some changes to determine if

this would would for me and it did. I have only one question because

I have never had the need to use the variant to data vi.

How do you create the "type def cluster" that you input into that

vi.

0 Kudos
Message 12 of 18
(1,703 Views)

First, you need create a customized control with type def. specified.

Then drag/add this control to you block diagram.

0 Kudos
Message 13 of 18
(1,698 Views)

 

I'm starting to feel a little thick.

So, I seez to me self. I'll just try it from

the beginning. This can't be that hard.

Wrong....

This is what I did.

Created a new Vi.

Place a cluster on the front panel.

customized it to a " Type Def ". ( not strict )

went to the block diagram created a reference to it.

Wired the ref to a loop.

Pulled a selection box around the loop.

Created a new sub Vi.

Open the new New SubVi and added

a property node.

This is where I loose it.

My property node becomes strict.

In your example it is not strict.

I did a drag and drop of your property

node( not Strict)  to my sub Vi and when

I wire it, it turn to strict.

What am I doing wrong.

 

 

 

 

0 Kudos
Message 14 of 18
(1,693 Views)

Here is the Vi

 

0 Kudos
Message 15 of 18
(1,691 Views)

The cluster refnum that you used in your subVI is a strict refnum. The subVI that created by exsiting diagram will use strick (with data type) control.

The correct way is:

1. Drag a control refnum from Refnum palette;

2. Right click control refnum, and select "Select VI Server Class" -> "Generic" -> "GObject" -> "Control" -> "Cluster" -> "Cluster";

3. Connect cluster refnum to connector pane as subVI input.

 

Because the cluster control that be used is a type def. control, you cannot un-check "Include data type" by right click cluster refnum in subVI (grey and disable), the only way is to create a generic cluster refnum by yourself.

 

If the control was not type def. and you created a subVI by exsiting diagram, you can right click control refnum and uncheck "Include data type" to use no-strict property.

0 Kudos
Message 16 of 18
(1,688 Views)

Many,Many thanks.

 

I come from a 35 year

history of working in strictly typed

languages, Pascal, Algol, Modula, and

others and some Labview concepts

just don't fit my skill set.

 

Many Thanks again

 

 

 

0 Kudos
Message 17 of 18
(1,679 Views)

It's my pleasure.

0 Kudos
Message 18 of 18
(1,677 Views)