LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why do reference controls placed on a sub VI produce an error but still work?

If I create a reference to a cluster and then place a control of that reference on a sub VI, the sub VI will list an error about the reference control, however this error is only listed if there is at least one other error in the block diagram.  If you corect the other error(s), the reference control related error(s) are not listed and the VI will execute properly.  How can an error be so unimportant? Isn't that what a warning is for?

The error listed is under Block Diagram Errors: Front Panel Terminal 'Cluster Reference': hidden front panel control has undefined type.

I have attached two VIs - Main.vi and Sub.vi that show an example of this situation.  The second error is that the error cluster is not passed through the false case of the case structure.  If you fix that problem by placing a wire between the input and output, the reference control error is no longer displayed and the VI can execute.

[Edited to include attachments - when I previewed the post they dissapeared]


Message Edited by andrewn on 01-18-2007 06:40 PM

Download All
Message 1 of 11
(4,612 Views)
Hey andrewn,
    So it seems there are a couple of errors ocurring here together.  One, the cluster reference is being seen as empty within the subVI.  The best way to use references in other VIs is to create a new control (.ctl) file and typedef the reference.  Then you can include this .ctl in all of your subVIs instead of copying the actual reference.  Whereas the reference from a specific cluster is just that, a reference to a specific cluster, the typedef'd control will be more generic within the subVI.
    The other problem is that the error message being displayed within LabVIEW does not make sense within this reference.  The control is definitely not hidden.  Therefore, I will report both of these errors.  Thanks for the info!!
Brian B
Account Manager
National Instruments
0 Kudos
Message 2 of 11
(4,575 Views)
Hey andrewn,
    This was reported to R&D (45IAFAU4) for further investigation. The workaround is to create a user defined control to contain the cluster reference.  Thanks for the feedback!
Brian B
Account Manager
National Instruments
0 Kudos
Message 3 of 11
(4,573 Views)
I'm attaching an additional example (LV8.20) to support Andrew's original problem report.  I wish this could be fixed.  As the NI App reported, I tried creating a Control Strict Type def but the problem still occurs.  That is, it still complains that the Control is hidden, which it is clearly not.
-crazycliffy

Message Edited by crazycliffy on 07-20-2007 01:45 PM

- crazycliffy
Download All
0 Kudos
Message 4 of 11
(4,451 Views)
Hi crazycliffy,

I have looked at the VI you uploaded. In what scenario is this a problem? That error message about the hidden control goes away if you remove the broken wire. R&D is aware that this issue exist with the hidden control error messeage, but as long as there is no other error that message does not show up.
Nick R
NI
0 Kudos
Message 5 of 11
(4,402 Views)
High 5 to the Discussions Forums. Was doing some major edits to Beta code and the 'control has undefined type' was showing up in most but not all of my sub-vi's that used my type def of clustered control references.
Could not figure out this morning why this error occurred, pretty sure it did not involve the changes I was making. Started getting a bit nervous after 3 attempts at editing my backup code to try and find the root cause of this 'error'
 
Decided to search the forums and up came this post. Presume once I fix the code that I was changing, the 'errors' will go away.
 
-AK2DM
~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 6 of 11
(4,321 Views)

I saw this occur using LabVIEW 2009 SP1!  Will this issue ever get fixed?  Through me for a big loop because I was trying to debug the first error listed, which was not the problem!  Fixing the second error first worked.

 

Bruce

0 Kudos
Message 7 of 11
(3,925 Views)

thanks for the workaround

 

However, big ditto on the NI lag for fixing it, seriously, get it done.

 

I just spent like 15 minutes trying to get the error to go away before resorting to googling for a clue.

0 Kudos
Message 8 of 11
(3,849 Views)

sorrry, my mistake, the advice from Brian is good advice, however, it is not a workaround.

 

The problem exists even when typedef references are used, I guess the good thing is that it is now a known problem (at least for us who read this thread it is).

0 Kudos
Message 9 of 11
(3,846 Views)

Just had the same problem with LV 2013 and stumbled upon this thread. Will this issue (reported to R&D in 2007 as "45IAFAU4") ever get fixed?

0 Kudos
Message 10 of 11
(3,211 Views)