From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot set a reference programmatically if the datatype is included in the reference

Can anyone advise what I am doing wrong, or even if it's possible, in my code please?

 

I've written a sub-VI (Reference.vi) that creates references to the controls that I wish to be referenced that are in my top level VI (FP.vi).

 

The references are stored in a cluster, that is a typedef (References.ctl).

 

Now, if I include the datatype for a control in my references typedef, I get "Error 91: Property Node (arg 1) in Reference.vi->FP.vi
<APPEND>Property Name: <b>Value</b>"

 

If I don't include the datatype, it works fine.

 

I'd like to include the datatype: is this possible?

 

I've left the tab control with the datatype included in References.ctl so the code is in the 'broken' state.

 

Thanks


Andy

Download All
0 Kudos
Message 1 of 4
(2,061 Views)

Hello Andy

 

The error is related to control refnum class mismatch. By unchecking the Include Datatype option, will set the newly added reference to more generic class. The code isn't in the broken state even if the datatype is not included(Tab).

 

-Rahul

Hit KUDOS and Mark as Solution to convey Thanks

 

0 Kudos
Message 2 of 4
(2,009 Views)

Hi Rahul

 

I think I forgot to include an updated VI: the loop stops and presents the error. I was working on it whilst typing and forgot to save the VI before uploading.

 

No reference is set for the tab with the included datatype. If you probe on the wire going to References in Reference.vi you can see that no reference is set for the tab control.


Regards


Andrew

Download All
0 Kudos
Message 3 of 4
(1,989 Views)

Hi Rahul,

 

Are you saying it's not possible to set the reference with the datatype included?

 

I've tried setting it to a more specific class, but it won't work either. 


Regards


Andrew

0 Kudos
Message 4 of 4
(1,925 Views)