12-03-2010 07:43 AM
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
Solved! Go to Solution.
12-03-2010 08:44 AM
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.