02-26-2015 10:41 AM
I am new to labview and am trying to edit some existing code. I have an enum set up as a type def. I'd like to edit the values of the enum. When I change these my code wont compile. I get "Wire class conflict errors". The broken wires where the VI server reference is mapped to a global.
02-26-2015 11:13 AM
@uk1980 wrote:
I am new to labview and am trying to edit some existing code. I have an enum set up as a type def. I'd like to edit the values of the enum. When I change these my code wont compile. I get "Wire class conflict errors". The broken wires where the VI server reference is mapped to a global.
VI Server Reference going to a global? What does that have to do with an enum? Can you supply code that shows your problem?
02-26-2015 05:10 PM
The short answer is that you basically cannot edit the values of an Enum. Think of an Enum as a type of Constant (meaning it doesn't change) that can take on values that you define during code development. For example, you could have an Enum called "Primary Colors" that takes on the values Red, Green, Blue. Once you define it, you cannot (at Run Time) change its values!
If you want to have a variable that takes on Run-Time-defined names, look into the Text Ring. However, I will tell you that I use Enums a lot, and have used Text Rings only rarely (and never if an Enum would do).
Bob Schor
02-26-2015 07:06 PM
I don't see where the OP says they are trying to change values during runtime. The fact he talks about a broken wire and that the code won't compile is a clue that the code is in edit mode.
My first guess is something like the typedef is not applied in the global, or the global needs to be opened and resaved to be sure the update of the typedef gets applied to it.
02-26-2015 08:26 PM