LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

enum type def name change gives coercion dot + name text to integer

LV 2014

Windows 7 professional

64 bit system

 

Starting with the Simple State Machine from the LV examples.

 

What I did:

1. Opened the Enum Type Def and went to "edit items". 

2. Changed the names of four states on the list, but didn't add any. 

3. Saved the Enum Type Def

 

What I got:

1. The enum had a coercion dot and

2. All the state names in the case structure were changed to integer numbers. 

 

Previously in this vi, I took the same 3 steps and changed the name of one state.

There was no coercion dot or other problem. 

 

But, trying again now to change the name of a single state, I get the coercion-dot problem again. 

 

Last week, I ran into this problem and undid it by

1. Reopening the Enum Type Def > edit items > 

2. Changing the names back exactly. 

Upon saving, the coercion dot disappeared and the text names came back in the case structure. 

 

Question:

1. Is there another method to change the case names in a type def enum controlled case structure? 

2. Do I just change the name of one state at a time. Though this doesn't always seem to prevent the Coercion-dot problem. 

 

I didn't add the code becuase it is the stock vi Simple State Machine. 

 

 

 

 

 

0 Kudos
Message 1 of 17
(3,913 Views)

You can try right-clicking one of the greyed out state enums (one that didn't get updated) and select Review and Update from Type Def.  This will bring you to a menu that makes you match the new names to the old ones.  

 

I was able to replicate your original issue but everything seemed to be fixed after doing this.

Matt J | National Instruments | CLA
0 Kudos
Message 2 of 17
(3,898 Views)

Hi Matt,

 

"right-clicking one of the greyed out state enums"

Do you mean right-click on the enum?

I tried the enum and several other places, before and after saving a change. 

I haven't found the option "Review and Update from Type Def".

 

Thanks,

Carmen

0 Kudos
Message 3 of 17
(3,883 Views)

My guess is that one of your constants within your state machine is not tied to the typedef.  Roll through your cases and see if you find any constants that don't have the typedef indicator in the corner.  That probably is also not showing a coerecion dot where it wires into the tunnel of your case structure.  Replace that constant with a copy of your typedef constant.

 

(I think Carmen meant "Relink" not "Review")

0 Kudos
Message 4 of 17
(3,876 Views)

I rolled through the cases on the enum. Each has the black corner type def indicator. 

All cases have the coercion dot. 

 

When Matt wrote to "try right-clicking one of the greyed out state enums", do you know where these greyed-out enums are? The closest thing I could find was when the enum type def was opened, the enum on the block diagram appeared somewhat diminished (but maybe not greyed out). I right-clicked all over (on the enum (open, closed, saved, unsaved), off the enum, on the case, off the case, etc) looking for an option called "Review (or Relink) and Update from Type Def". But can't find.

 

 

0 Kudos
Message 5 of 17
(3,838 Views)

There could potentially be another enum type def that you are using at the same time.

 

/it might be to the poiny where you will have to post some code for us to analyze and figure out your problem.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 6 of 17
(3,834 Views)

This is the code. It is the Simple State Machine from the LV opening screen.

There are two versions. LV 2014 (the original) and 2013.

 

After saving as 2013, I opened the vi and there was no problem. The 2013 version has no coercion dot. 

In 2014, the coercion dot persists after saving multiple times. 

 

 

 

 

Download All
0 Kudos
Message 7 of 17
(3,820 Views)

It looks like some of your enums were not updated.  I found multiple sets of enums, even though they appeared to be linked to the same type def.  Can you post you state.ctl file as well?


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 8 of 17
(3,803 Views)

I'm looking in the 2014 version, and you do have different enums within your event structure in case #1.

In Exit event case, your enum has the items Initialize, Wait for Event, test state 2, test state, Exit

In Do Something Replace Me, your enum as the items Initialize, Wait for Event, User state 1, test state 2, Exit

In Do Something Else Replace Me, your enum as the items Initialize, Wait for Event, User state 1, User state 2, Exit

 

Right there are at least 3 different enums.  Now they all claim to be apart of State.ctl.  But you didn't attach that for me to look into.

 

When I open up your 2013 version in 2014, I see the same problems.  I don't have LV13 installed to be able to open up your LV13 version directly in that.

 

0 Kudos
Message 9 of 17
(3,798 Views)

This is the 2014 .ctl file. 

0 Kudos
Message 10 of 17
(3,796 Views)