02-22-2010 09:52 AM
I ran across This thread and was surprised. I expected that setting the "Allow undefined values at run time" checkbox on the control Properties>Edit Items page would affect the control properties Response to values outside limits>All.elements.
Can someone straighten me out on how these properties should interact? It seams somewhat insane to not allow undefined values and ignore values outside limits
Solved! Go to Solution.
02-22-2010 12:47 PM
First, your code shows a ring and not an enum (which makes sense, since an enum can't have undefined values).
Second, I'm not in front of LabVIEW, but I'm assuming the property you're looking at actually comes from the Numeric class (as opposed to the Named Numeric class, which is a child Numeric) and would therefore be shared by all numerics. This leads me to assume that the property corresponds to what you see if right click a numeric control, open its properties dialog and look in the second (if memory serves) page.
02-22-2010 01:09 PM
tst wrote:First, your code shows a ring and not an enum (which makes sense, since an enum can't have undefined values).
Second, I'm not in front of LabVIEW, but I'm assuming the property you're looking at actually comes from the Numeric class (as opposed to the Named Numeric class, which is a child Numeric) and would therefore be shared by all numerics. This leads me to assume that the property corresponds to what you see if right click a numeric control, open its properties dialog and look in the second (if memory serves) page.
Thanks- and you are right I showed rings because they allow manipulation of the "response to values outside limits" properties. However, if you replace the controls with an enum you can see and set these properties in a property node. HOWEVER, setting the properties to ignore seems to have no effect (as the value is coerced prior to passing it to the control???).
Again- I'm just a bit confused as to what these properties really effect and if they even have an effect on an enum. Moreover, since I ran across the question in a TestStand context and TestStand treats Enums as Numerics- What, if any, odd behaviors might we see as a result?
02-22-2010 02:18 PM
I don't know what the interaction with TS will do, but enums have the numeric values as part of the data type - they CAN'T have values outside the range. If you wire a value which is outside the range into an enum it will always coerce it into one of the allowed values.
In any case, you should note that for all numerics, the limits set like this (either using a property or using the properties dialog) only affect the UI. If you wire a value into such a control these limits are ignored.
02-22-2010 02:39 PM