LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Type Defed Ring to Enum back to Ring bug

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



Ed Dickens - Certified LabVIEW Architect - DISTek Integration, Inc. - NI Certified Alliance Partner
Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
Message 1 of 4
(2,931 Views)
I do not see this problem in LabVIEW 7.1.

Can some one check LabVIEW 8.0.0?

Thanks
Ed


Ed Dickens - Certified LabVIEW Architect - DISTek Integration, Inc. - NI Certified Alliance Partner
Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
0 Kudos
Message 2 of 4
(2,922 Views)

Ed,

I have tested this in 8.0.0 and see the same behavior as you do. I was wondering, when you change from the enum back to the ring control, does the graphic for the ring have the white background as the enum did? I am having this happen to me, as well as seeing your behavior. I will be filing a corrective action request on this issue, but would like to know about the background color after the change back. Let me know what you find out. Thanks!!

 

Tyler H.

National Instruments

0 Kudos
Message 3 of 4
(2,888 Views)
Hello Tyler,

I do see the same white background on the Ring after it replaces the Enum.

I also have an update from the app. Eng. (
Eric Sulzer) that's been working with me on this.

The behavior we're seeing in 8.0 and 8.0.1 is an intentional change from 7.x.
In LabVIEW 7.x, type definitions will update non-datatype information (such as item names and values) once and only once when switching between datatypes. In LabVIEW 8, however, a conscious decision was made to not do this update, so that is why we see the default enum values after you replace an enum with a ring. If you do wish to carry over non-datatype information when switching datatypes, it is recommended that you simply change it to a strict type def, save and update, and then switch it back to a regular Type Def.

So this actually isn't a bug, it's the corect behavior for 8.x.

Ed


Ed Dickens - Certified LabVIEW Architect - DISTek Integration, Inc. - NI Certified Alliance Partner
Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
0 Kudos
Message 4 of 4
(2,860 Views)