LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Create sub element for Enum elements

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

0 Kudos
Message 1 of 5
(3,562 Views)

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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 5
(3,556 Views)

Thank you very much for the replay.

 

Otherthan Enum is there any possibility to do like this in LabVIEW?

 

 

Regards,

Nagaraju

0 Kudos
Message 3 of 5
(3,520 Views)

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

0 Kudos
Message 4 of 5
(3,489 Views)

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

0 Kudos
Message 5 of 5
(3,431 Views)