LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Case Structure: Selector values are not unique

Solved!
Go to solution

Getting the error: Case Structure: Selector values are not unique...

 

Using Producer-Consumer architecture w/ queue comms and SW-Events.  DevSuite - LV2014

 

My consumer loop is using a typedef to control case selection.  The typedef is an enum and has text names for each value.  All my cases are in quotes and there are no duplicates in the typedef or the case structure.

 

Help

 

JF

0 Kudos
Message 1 of 17
(5,856 Views)

Can you post your case structure as a snippet or VI?

0 Kudos
Message 2 of 17
(5,841 Views)
Very strange. Check for duplicates separated by a comma in the same case, easy to miss especially as they can be hidden if the structure is not wide enough to show all of the text.
0 Kudos
Message 3 of 17
(5,836 Views)
Solution
Accepted by topic author Jeff.F

Jeff.F a écrit :

Getting the error: Case Structure: Selector values are not unique...

 

Using Producer-Consumer architecture w/ queue comms and SW-Events.  DevSuite - LV2014

 

My consumer loop is using a typedef to control case selection.  The typedef is an enum and has text names for each value.  All my cases are in quotes and there are no duplicates in the typedef or the case structure.

 

Help

 

JF


I don't know what you're doing exactly so I will guess. Do not write text between quotes for the case values. Wire the enum to the case selector, right click on the case structure and select "add case for every value".

 

It might be a little different as i'm teliing it from memory.

 

Ben64

Message 4 of 17
(5,831 Views)

Just to leave no stone unturned... 😄

 

I am assuming that you are double-clicking the error text and it brings you to the case structure that you already think has the error. Could it be there is another case structure hidden elsewhere which actually has the problem?

0 Kudos
Message 5 of 17
(5,828 Views)

Do you have a non-typedef constant wired to the state wire somewhere?

 

Lynn

0 Kudos
Message 6 of 17
(5,819 Views)

You sure it's a typedef enum and not a typedef ring? Not sure if this could cause duplicates, but maybe?

0 Kudos
Message 7 of 17
(5,808 Views)

I never type with quotations.  I rely on the system to add the quotes.  Good question. Check that one off.

 

JF


@ben64 wrote:

Jeff.F a écrit :

Getting the error: Case Structure: Selector values are not unique...

 

Using Producer-Consumer architecture w/ queue comms and SW-Events.  DevSuite - LV2014

 

My consumer loop is using a typedef to control case selection.  The typedef is an enum and has text names for each value.  All my cases are in quotes and there are no duplicates in the typedef or the case structure.

 

Help

 

JF


I don't know what you're doing exactly so I will guess. Do not write text between quotes for the case values. Wire the enum to the case selector, right click on the case structure and select "add case for every value".

 

It might be a little different as i'm teliing it from memory.

 

Ben64


 

0 Kudos
Message 8 of 17
(5,805 Views)

There are other case structures but clicking on the "Go To Error" button takes me to this case structure.  It also doesn't change the case to any offending case.  Just where-ever case was already up.  Another good Q.  Check that one off.

 


@altenbach wrote:

Just to leave no stone unturned... 😄

 

I am assuming that you are double-clicking the error text and it brings you to the case structure that you already think has the error. Could it be there is another case structure hidden elsewhere which actually has the problem?


 

0 Kudos
Message 9 of 17
(5,771 Views)

No


@johnsold wrote:

Do you have a non-typedef constant wired to the state wire somewhere?

 

Lynn


 

0 Kudos
Message 10 of 17
(5,769 Views)