09-04-2015 07:02 AM
Dear Sir,
I want to create sub element for Enum elements. For example I have a enum consists of the elements Fixed, Chirp & Agile. And I have a sub elements UP and DOWN for Chirp. Kindly help me how to add these sub elements to enum element.
Regards,
S Nagaraju
09-04-2015 07:32 AM
There is no hierarchy to the enum values. You can just have a "Chirp Up" and "Chirp Down" in your enum or you could have another enum for the up or down.
09-04-2015 11:32 PM
Thank you very much for the replay.
Otherthan Enum is there any possibility to do like this in LabVIEW?
Regards,
Nagaraju
09-05-2015 12:37 PM
The beauty of an Enum is it is simple -- just an "enumeration", a "one of N" choice. What you are describing sounds to me like a "flexible, modifiable choice". I can think of a way to do this in LabVIEW, but I'm not sure I would choose it over the suggestion Crossrulz made.
But if it is something you really need, here is an approach. You have base types Fixed, Chirp, and Agile. You've already said Chirp has sub-types, Up and Down. Suppose Agile and Fixed also had sub-parameters. You could create a "Flexible Constant" as a Cluster with two elements -- an Enum, "Base Type" (the Fixed, Chirp, Agile Enum) and "Modifier", which would be a Variant. If the Base Type were Chirp, you'd load the Variant with the appropriate Chirp sub-type, and would do similar manipulations for Fixed and Agile. This is similar to the Message Type used in the Queued Message Handler, where you have a Message String part and a Data Variant part.
Bob Schor
09-07-2015 01:32 AM
Thank you very much Bob,
Right now i am proceding as per Crossrulz instructions. Let me know if that case is possible.
Regards,
S Nagaraju