01-22-2024 06:53 AM - edited 01-22-2024 07:06 AM
Hi
I was wondering if there is such a property node for numeric controls, that has a boolean value for when the value was coerced, similar to the In range and coerce function, which has In range? boolean value.
I couldn't find it myself.
01-22-2024 07:21 AM
01-22-2024 08:53 AM
I believe the coercion settings for controls are primarily intended for user input. Maybe even entirely intended for that... I've never actually tested whether they work with programmatically set values or ones passed in via the connector pane.
This is just to stop users from inputting values that are not allowed, and since the control immediately changes based on the settings the user gets immediate feedback on this and the "bad" value is never passed downstream. Is that the sort of situation your are trying to monitor?
If you are trying to use this on controls used as inputs on the connector pane then I'd suggest programmatically handling out of range values is probably a better approach.
01-22-2024 09:18 AM
Hi Jim,
@JimB. wrote:
I believe the coercion settings for controls are primarily intended for user input. Maybe even entirely intended for that... I've never actually tested whether they work with programmatically set values or ones passed in via the connector pane.
In times long ago (LabVIEW4 to LabVIEW6?) the input coercion also was applied to values coming from wires to connector pane inputs of a subVI. But that is long ago…
Since then input coercion is ONLY applied to user input!
01-23-2024 01:50 AM
My case is user can set temperature and then save the setting. If the temperature is not in range it is coerced to range and then a warning to the user is displayed (pop-up).
I've used the In range and coerce for this, i just thought there might be better ways.
01-23-2024 02:18 AM
Hi AeroSoul,
@AeroSoul wrote:
My case is user can set temperature and then save the setting. If the temperature is not in range it is coerced to range and then a warning to the user is displayed (pop-up).
I've used the In range and coerce for this, i just thought there might be better ways.
I don't think there is a better way.
You have 3 input values (user input, high limit, low limit) and you want to create certain program behaviour based on these 3 inputs: InRangeAndCoerce is a very simple way to achieve that…