This has been discussed several times in these forums, but I have never actually found a resolution to the question:
In this scenario, I have a C enumerator defining a bunch of errors:
enum{ NoError = 0, NotInitialized = 1, MotorOverheated = 2, MotorDisconnected = 4, CommutatorError = 8}
When this value is sent to LabVIEW, i'd like to parse that easily by wiring it directly to a labview enum that I have created.
Here's the problem, the C enumeration is not sequential, and LabVIEW enumerators must be. So there is an offset.
Now if I were to use a Ring to define my motor errors, I run into the problem discussed in many threads regarding how rings do not update even if they are strict typedefs.
What i end up having to do is create a conversion VI that basically uses a case structure to convert the error from the C enumerator, to a labview typedef. What a pain.
So what's the best way to do this?