Showing results for 
Search instead for 
Did you mean: 

Another interesting LV 2011 Feature/Bug ?

If you open your VI, right click on each reference and chose Show Control, you will see you have an empty cluster.  The reference has no link to your typedefs.


ScreenHunter_01 Sep. 07 18.41.jpg



If you delete the empty clusters then add your typedefs:


ScreenHunter_02 Sep. 07 18.42.jpg


This will break the link on your Value properties:


ScreenHunter_03 Sep. 07 18.43.jpg


so you just need to reselect Value from the property list:


ScreenHunter_04 Sep. 07 18.43.jpg


and then your error box will look like:


ScreenHunter_05 Sep. 07 18.43.jpg

0 Kudos
Message 11 of 23

As I said before, it should be noted that there is still a problem.  In previoue verisons of LabVIEW, having an empty cluster in a control reference would generate a warning, not an error.  There are situations where you would want to have a generic cluster reference.


Your code would run as you posted.


There is still a problem, as the errors are not correct.

Message 12 of 23

Hmmm... So basically you are telling me that I was not using the proper way to create a reference to a cluster?

I tried disconnecting the control from the typedef before creating a reference and making a control out of it, and that gives exactly the same result. That is, the "Show Control" shortcut will show an empty cluster. I tried starting from scratch, creating a two boolean cluster and it failed again.

If I use a simple boolean or a simple chart, things look fine.

Does *this* qualify as a feature? Or where can I learn about this "non-feature"? I think I have created references to different types of controls like that since I have started using LV (or since references were introducde).


0 Kudos
Message 13 of 23

Actually my bad eyesight and another LabVIEW bug caused me an issue.  What you did is fine.  The star that is supposed to indicate the Data Type is included has moved behind the icon, so it is barely visible.  When I saw it was missing (although it wasn't), I thought you had an issue.


I have never bothered to look at the controls because I have the star and know it's linked.  But, it appears it doen't embed the typedef into the reference.


So, the compiler is still flagging errors that don't actually exist.

Message 14 of 23

That problem where a reference control to a cluster shows an empty cluster seems to have been around since at least LV 8.5 (I just checked).

In LV 7.1, I cannot select "Show Control" (it's grayed out) so I dunno.

But I am pretty sure I have used such reference to cluster controls and they worked fine... I need to look into some of my code before I can confirm.


So, just to clarify, in the meantime, do we agree that:


1) creating a reference constant from a cluster (any, not even typedef), selecting this constant and using "Create Control" and switching back to the FP, choose "Show Control" in the contextual menu for the reference control shows an empty cluster? Valid through LV 8.5 (at least)


2) this does not make any sense?

0 Kudos
Message 15 of 23

The method you described is what I typically do.  I would not have brought it up if the star indicating the data type was included was in front as it is supposed to be.


There appear to be no issues with what you did in your code.  The issue is the LabVIEW compiler is not correctly identifying errors.

0 Kudos
Message 16 of 23

But what about the reference to a cluser (typedef or not) not correctly showing its type?

0 Kudos
Message 17 of 23

I saved everything back to 8.6 and the invalid error messages continue to show up in LV 2011, 2010, 2009, and 8.6,


I am concerned that the reference don't show the control.  I can manually make the reference as I showed above.  Going back to 8.6, this doesn't happen.  I also don't seem to be able to get the Data Type included, although your saved VI continues to show it.


Everything will continue to work since the cluster takes a variant and you use typedefs everywhere else.  I would think that it should show the control, but the step of creating the reference must cause the break of dropping the cluster typedef.  As long as the include data type is included, you should be fine anyway because it will not allow a different cluster reference to be wired to ti.

0 Kudos
Message 18 of 23

OK, I see that you did not follow my diverging track 🙂

Here is what I am NOW talking about:


this is a LV 8.5 FP and its diagram:




Selecting "Cluster", I created a reference constant (shown below in the middle).

From this constant, I created a "Control": that's "Cluster 2" shown on the diagram below, and on the FP above, after I selected "Show Control".




The control IS NOT SHOWN. And it does not matter that the cluster is a typedef or not (it is not).

So either I don't understand what we have been talking all along (I don't care about the bogus error if NI decides that it does not matter, I really need to move on), or I don't understand what the purpose of "Show Control" in a reference control is supposed to do.

From what I see, it does not work with Clusters. Typedef or not. Is that fine? Fine! Is that not? Fine with me too.



0 Kudos
Message 19 of 23

As I said, I don't see anything wrong with what you did.  I have done the same in the past.  Clusters seems to revert down to an empty cluster and any data.  I guess I have never bothered to look at the control in the reference before.


I do typically create it the way I outlined, which is to create a control reference and drag the control type into it, or manually select it from the right-click list if it is a primitive (i.e. boolean, string, etc.).


The (hidden) star is what is important - it indicates that the type of cluster is embedded in the reference.  This means you cannot wire a different cluster type's reference.  If the star is not there, you can wire any cluster to the reference.

Message 20 of 23