Jump to content

Changing a Typed Defed Ring to an Enum and back to a Ring causes the Ring to have incorrect values


Recommended Posts

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 do not see this problem in LabVIEW 7.1. Can somebody check 8.0.0?

I'll update when I hear back from Support

Ed

Link to comment

I 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 wil 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

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.