Jump to content

Case Selector labels disappear


Recommended Posts

Hi all,

I use an enum at the case selector input of a case structure to build a small state machine. The enum is defined as a type def, so that I can add states easily without editing all enums by hand.

If I connect a case structure to the enum, the first time, the case structure labels are generated from the enum labels.

Unfortunately if I add a state to the enum, the case structure labels are set to the pre-defined labels e.g. 0 (default), 1, 2, ....

Changing case structure to sequence and back didn't work, adding cases also didn't work.

Has anybody an idea how to get the labels back to the case structure?

Greetings,

Toni

Link to comment
Hi all,

I use an enum at the case selector input of a case structure to build a small state machine. The enum is defined as a type def, so that I can add states easily without editing all enums by hand.

If I connect a case structure to the enum, the first time, the case structure labels are generated from the enum labels.

Unfortunately if I add a state to the enum, the case structure labels are set to the pre-defined labels e.g. 0 (default), 1, 2, ....

Changing case structure to sequence and back didn't work, adding cases also didn't work.

Has anybody an idea how to get the labels back to the case structure?

Greetings,

Toni

3514[/snapback]

I'm not quite sure how you made the case selector labels revert back to ints. I tried adding, deleting and I couldn't get it to do it. In fact, I don't think I've ever had this happen to me after years of using enum driven case statements. Maybe I'm lucky. Can you reproduce this at will?

That said, you do realize you can just click into the label with the labeling tool to rename the labels back to match the enum...

Randy

Link to comment

I have seen this problem before.

It happened in a state machines where one of constats to be fed back through the shift register

is a control not a type def.

Initially everything looks fine but when the typedef is changed the control constant

does not update.

The common exit tunnel in the case structure now has two separate enums wired to it and

it reverts to an integer which changes the case structure display.

coercion dots should show up on the exit tunnels to indicate this.

post-584-1105721152.jpg?width=400

post-584-1105721180.jpg?width=400

If this is the case you need to find all the constants that are not linked to the typedef and replace them.

post-584-1105721533.jpg?width=400

Hope this helps.

Link to comment
I have seen this problem before.

It happened in a state machines where one of constats to be fed back through the shift register

is a control not a type def.

Initially everything looks fine but when the typedef is changed the control constant

does not update.

The common exit tunnel in the case structure now has two separate enums wired to it and

it reverts to an integer which changes the case structure display.

coercion dots should show up on the exit tunnels to indicate this.

post-584-1105721152.jpg?width=400

 

post-584-1105721180.jpg?width=400

If this is the case you need to find all the constants that are not linked to the typedef and replace them.

post-584-1105721533.jpg?width=400

Hope this helps.

3522[/snapback]

Ah ha... that explains it.

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.