LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Local vairables with same name bug?

As seen in this thread, LabVIEW allows multiple controls with the same Label. But in LabVIEW 8.5, it seems there is a bug when using local variables of controls with the same name.

Try this:
  1. Create two numeric controls, and give them the same name.
  2. Create a local variable for the first control by right-clicking and select Create - Local Variable.
  3. Do the same for the second one.
  4. Double-click on either of the local variables, and it will go to the correct control on the front panel.
  5. Now, click on the local variable for control number two - you will see that the check is next to the first name in the list.
  6. If you click on either name in the list, the second local variable control will now always be locked to the first control.
If you create more controls with the same name, and create a local variable for each one, once you try to change the control the local is pointed to, it always sticks to the first control.

Is this known, or already reported?

- GWB



(Just tested, and it does not happen this way in 8.2)


Message Edited by LabViewGuruWannabe on 12-19-2007 12:00 PM

Message Edited by LabViewGuruWannabe on 12-19-2007 12:02 PM
0 Kudos
Message 1 of 5
(3,733 Views)
I believe this bug was most likely introduced by the new LV feature which puts the variable names in alphabetical order instead of tabbing order.

I can confirm your problem.


Message Edited by Matthew Kelton on 12-19-2007 12:11 PM
0 Kudos
Message 2 of 5
(3,726 Views)
That reminds me of an error I encountered recently in LV 7.1.

I had a Vi that passed a reference of a control to a generic SubVi. I renamed the Control, but the reference's lable wasn't renamed. It was running fine in the developement system though. But once I build an application, I got an error message (I think the code was 3).

There seems to be a trade-off, as you can remove a control/indicator in a SubVi, create it new (think about a queue with a changed data type), reconnect it to the connector pane, and most likley you won't need to go through all Callers to relink the SubVi. From the behaviour these changes require additional work or not, I suppose that LV internally matches the namesfor this purpose.

Felix
0 Kudos
Message 3 of 5
(3,707 Views)

Hi GWB,

This was reported to R&D (# 4EMD3JN4) for further investigation. R&D is currently investigating the issue, and I added these steps to the report.

Thanks for the feedback!

0 Kudos
Message 4 of 5
(3,656 Views)

Not fixed yet as of Labview 2011.

 

Open the block diagram of the attached LV Selection.vi.  Left-click on the local variable [^One].  There are three selections:

v One

  Two

  Two

 

Select the first control named Two.  Then inspect, you will see

    One

  Two

v Two

 

 

 

 

0 Kudos
Message 5 of 5
(2,998 Views)