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)
|
![]() |
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
|
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
|
||
|
|
|||
| Ad |
Jan 14 2005, 12:52 PM
Post
#
|
||
|
|
|
||
|
|
|||
Jan 14 2005, 03:22 PM
Post
#2
|
|||
|
Active Member Posts: 19 Joined: 8-October 04 Member No.: 767 LV:8.0
|
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
|
||
|
|
|||
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
|
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..... So I will re-programm the vi and see what happens. Toni, the surprised
|
||
|
|
|||
Jan 14 2005, 04:58 PM
Post
#4
|
|||
|
Extremely Active Premium Member ![]() Posts: 376 Joined: 6-August 04 From: Gurnee Illinois Member No.: 584 Using LabVIEW Since:1997 LV:8.5 ,8.2.1 ,7.1
|
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. ![]() If this is the case you need to find all the constants that are not linked to the typedef and replace them. ![]() 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
|
||
|
|
|||
Jan 14 2005, 05:03 PM
Post
#5
|
|||
|
Active Member Posts: 19 Joined: 8-October 04 Member No.: 767 LV:8.0
|
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. ![]() If this is the case you need to find all the constants that are not linked to the typedef and replace them. ![]() Hope this helps. Ah ha... that explains it.
|
||
|
|
|||
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
|
mballa, thank you. In fact it was exactly as you described. I found the non-typedef enum while I was reprogramming....
Greetings, Toni
|
||
|
|
|||
![]() ![]() |
| Time is now: 4th December 2008 - 06:48 AM |