LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to properly make this VI generic?

I use several QSM (one main and some subs) and for the states I use enum (nice because the case structure is very intuitive with the text).

The queue messages are basically a cluster containing an enum (the message ID) and a variant (for whatever data is needed for that message).

 

Let say I have two enums with different items: ENUM1 = {CAT, DOG} & ENUM2 = {CAR, TRUCK}

I need to make a standard VI that will take either of those enum controls as its input and output the list of its strings.

 

My guess is that I need to do something with references and the String[] property node, but I'm just not getting it right.

 

If somebody could just point me in the right direction, I'd appreciate it.

 

Thanks,

Matt

 

0 Kudos
Message 1 of 4
(2,263 Views)

The VI you need already exists.  Look in vi.lib\Utility\VariantDataType\GetNumericInfo.vi.

0 Kudos
Message 2 of 4
(2,249 Views)

Thanks, that VI does what I need, but  I'm more interested in the underlying code to accomplish it.

Any ideas on what's beneath the hood in that VI?

 

Thanks much.

 

Matt

0 Kudos
Message 3 of 4
(2,242 Views)

Probably several calls to internal LabVIEW functions using Call Library Function Node with the library name set to LabVIEW.

0 Kudos
Message 4 of 4
(2,228 Views)