03-03-2011 12:15 PM
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.
03-03-2011 06:24 PM
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.
03-03-2011 06:42 PM
First, you need create a customized control with type def. specified.
Then drag/add this control to you block diagram.
03-03-2011 07:47 PM
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.
03-03-2011 07:48 PM
Here is the Vi
03-03-2011 07:59 PM - edited 03-03-2011 08:05 PM
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.
03-03-2011 08:35 PM
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
03-03-2011 08:38 PM
It's my pleasure.