I've run into a bug in 8.0.1 involving type defed Ring Controls.
The problem is if you create a Ring Control with non-sequential values,
make it a Type Def, change the type defed Ring to an Enum, then back to
a Ring, the values in the already existing instances of the control
will not contain the correct values. I've already reported this to
Support and I'm waiting their answer. The steps to reproduce the
problem are below. I've been able to reproduce this on two different
PC's both running LV 8.0.1.
- Create a blank VI and drop a Ring
control.
- Open the Control Editor for the Ring and
change it to a Type Def
- Edit the Rings items to add 3 or 4 items
and uncheck the "Sequential Values" checkbox and change the values to something
other than the default 0, 1, 2... I was making a ring to define custom error
codes so I had 5001, 5002, 5003...
- Save the control, apply the changes and
close it.
- Then I decided I wanted it to be an Enum
(I forget why), so opened the Type Def, replaced the Ring with an Enum, saved,
applied and closed.
- Then I remembered the Enums values are 0, 1,
2... so that's not going to work for my error codes. Re-open the type-def, replace
the enum with a ring, edit the values back to my error codes, save, apply
close.
- Turn on the digital display of the control
on the VI and you'll see the values are 0, 1, 2... instead of the values from
the type def. Open the type def and verify it contains the correct values, it
does for me.
- Now, open the type def again, drag the
icon to the front panel to create a new instance of the control and it contains
the correct values. So now you have two instances of the same type defed Ring
control that contain different numeric values. Make the Digital Display visible
to verify this.
- Now, change the Type Def to a Strict Type
Def and everything contains the correct values.
I'll update when I hear back from Support
Ed