I'm trying to do some arithmetic operations on enums using the compound arithmetic vi, and using the result as a selector for a case structure. The problem is that the compound arithmetic vi changes the data type to long (from U16). I tried using the type cast vi with the type input wired to an enum constant to convert the result back to the enum data type, but I keep getting a wrong result. I've checked the arithmetic and its correct the problem is casting the result back to the enum type.