LAVA Forums Buy cool LAVA gear Forums RSS Feed

Welcome Guest ( Log In | Register )

> Related links

Check out our General Code Repository Files. Also, before posting here, check to see if your post doesn't fit into another subforum by category.


Tags
(This content has not been tagged yet)
 
Reply to this topic Start new topic
> Case Selector labels disappear, Changing enum changes labels to default
anton.lindner
post Jan 14 2005, 12:52 PM
Post #1


Active
*

Member
Posts: 11
Joined: 19-January 04
From: Munich
Member No.: 239
LV:7.1.1
Germany


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

This post has been edited by anton.lindner: Jan 14 2005, 12:54 PM


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
Ad
post Jan 14 2005, 12:52 PM
Post #















Tags
(This content has not been tagged yet)
Go to the top of the page
Quote Post
RandyR
post Jan 14 2005, 03:22 PM
Post #2


Active
*

Member
Posts: 19
Joined: 8-October 04
Member No.: 767
LV:8.0
Nothing Selected Nothing Selected Nothing Selected


QUOTE (anton.lindner @ Jan 14 2005, 07:52 AM)
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
*


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


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
anton.lindner
post Jan 14 2005, 03:51 PM
Post #3


Active
*

Member
Posts: 11
Joined: 19-January 04
From: Munich
Member No.: 239
LV:7.1.1
Germany


Hi Randy,

thanks for your fast answer.
Although the original problem still exists I couldn't reproduce this behaviour with a new vi. Seems like a one-time issue. Curious.....
wacko.gif

So I will re-programm the vi and see what happens.

Toni, the surprised


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
mballa
post Jan 14 2005, 04:58 PM
Post #4


Extremely Active
****

Premium Member
Posts: 384
Joined: 6-August 04
From: Gurnee Illinois
Member No.: 584
Using LabVIEW Since:1997
LV:8.5 ,8.2.1 ,7.1
United States us_illinois us_michigan


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.

Attached Image Attached Image

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

Attached Image

Hope this helps.

--------------------
If you are interested in Time saving programming
tools created in LabVIEW then download my
Icon Editor Updated July 7th 08 and my
SubVI Helper Updated Jan 7th 08


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
RandyR
post Jan 14 2005, 05:03 PM
Post #5


Active
*

Member
Posts: 19
Joined: 8-October 04
Member No.: 767
LV:8.0
Nothing Selected Nothing Selected Nothing Selected


QUOTE (mballa @ Jan 14 2005, 11:58 AM)
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.

Attached Image  Attached Image

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

Attached Image

Hope this helps.
*


Ah ha... that explains it.


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
anton.lindner
post Jan 18 2005, 01:31 PM
Post #6


Active
*

Member
Posts: 11
Joined: 19-January 04
From: Munich
Member No.: 239
LV:7.1.1
Germany


mballa, thank you. In fact it was exactly as you described. I found the non-typedef enum while I was reprogramming.... smile.gif

Greetings,

Toni


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post

Reply to this topicStart new topic

 




Time is now: 8th January 2009 - 01:22 AM