ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Any Problem with Enumerations in Instruments Drivers

Solved!
Go to solution

I noticed in the National Instruments driver standard guidelines whenever the mention of a control that would have different test-based options came up, a ring selector was recommended and not an enumeration... Is there any good reason to stick with ring selectors and not use enum?? For example, one of my drivers has 4 different channels CH1, CH2, CH3, CH4... An enumeration will work out nicely here because I can use format to value from a text based config file and will create the proper enumeration value that I want. 

 

"CH1" (text) --> format to value --> CH1 (enum value)

 

Thanks for your help

0 Kudos
Message 1 of 2
(2,549 Views)
Solution
Accepted by topic author amaglio

Are you referring to this document: http://zone.ni.com/devzone/cda/tut/p/id/3271 ? There's no explicit mention in there about not using an enumeration. I think the main point is to use some for of menu control to facilitate the selection of the function. In some cases a ring may be more convenient than an enum. For example, if a selection requires the actual value to be something other than the normal value of the control. Example, having the selection of "DC" would require sending a value of 101 to the instrument instead of 0. In this case a ring would be more convenient since you can set non-sequential values for the ring items.

0 Kudos
Message 2 of 2
(2,538 Views)