> Is it really the same thing? From reading the documentation it is not
> clear that I can assign say the string "Offset" to be equivalent to
> 32. It seems more like a enumerated type in C where I define as series
> of strings "Red", "Green" and "Blue" to be equivalent to 0,1,2. In
> LabView it appear I am limited to setting 0 as the first value of an
> enum type. Is this correct? If not maybe I can use this.
> I do not have more than one possible value. It is not an input, it is
> a hard-coded program constant, and I want it to be defined once but
> used many times in a variety of sub-VIs. Maybe I need to create
> aglobal variable?
The enum in LV is closest to the enum in C, pascal, etc. And you are
correct that it is the stict type that
maps sequentially from zero. It
is a good choice for ordered sets where you do not care what the value
of the objects are or look the value up elsewhere.
For the systemwide constant value, a global is one choice, and a common
one from many diagrams I've seen. A better alternative IMO is to use a
VI. Make a little icon or give the subVI a good name. Have the value
on the connector output and place the subVI in your user.lib for easy
access from the palettes. Another good thing about this is that you can
bundle a couple of these together on the connector pane or even add
simple selectors as inputs to start building up a small retrieval
interface. Don't forget to make the values be default before saving.
Greg McKaskle