LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Controls[] Property don't give a right refnum of a type def LV2010 OK, LV2012 BAD

Solved!
Go to solution

Same code. Into LV2010, the answer is TRUE and in LV2012, the answer is FALSE.

 

This cause me trouble.

Download All
0 Kudos
Message 1 of 12
(5,772 Views)

It would be better to attach the actual VI's or use the Code Capture Tool.  The built-in LabVIEW snippet maker mangles references.

 

In both cases, you are indexing out the 0th control.  Perhaps when the VI was recompiled for LV 2012, the order of the controls was changed and the 0th control is no longer the zeroth.

 

Instead of using Index Array, compare your reference to the entire array of controls to get an array of booleans.  See if one of the other indices comes up as a match.

Message 2 of 12
(5,757 Views)

Ignore this.

-----

The best solution is the one you find it by yourself
0 Kudos
Message 3 of 12
(5,750 Views)

Sorry for the confusion. Even this example give me different answer into LV2010 and LV2012

 

Please, try this attachments

0 Kudos
Message 4 of 12
(5,739 Views)

LabVIEW 2011 seems to behave just like LabVIEW 2012.

 

I found this thread.  http://forums.ni.com/t5/LabVIEW/Control-reference-bugs-LV2011/m-p/1893991 which seems to discuss the same issue regarding control references and typedefs.

 

Also:

http://forums.ni.com/t5/LabVIEW/typedef-and-strict-typedef-control-vi-server-reference-issue-LV/td-p...

 

It looks like CAR# 323101.

0 Kudos
Message 5 of 12
(5,723 Views)
This is also true form a reference comming from the ctrlref on an event case??? I will need to test that tomorrow because if this is the case, I may jump over the ugrading to labview 2012 and wait for this issues to be solved.
0 Kudos
Message 6 of 12
(5,714 Views)

The CtrlRef Value form Event Structure is equal to the reference of Numeric Value.

Example in LV2012

0 Kudos
Message 7 of 12
(5,679 Views)
Solution
Accepted by CFiset

Do you think this can be a workaround ?

Workaround.jpg

0 Kudos
Message 8 of 12
(5,655 Views)

That should work as long as you have unique labels for all of your controls.  No unlabeled controls and no controls that have the same label such as two called "Temperature".

Message 9 of 12
(5,631 Views)

Thank you

0 Kudos
Message 10 of 12
(5,629 Views)