Hi ,
How to restrict negative values in tags ? Even if user enter negative value ,how to change that as positive value , is there any datatype which accepts only positive values
Hi ,
How to restrict negative values in tags ? Even if user enter negative value ,how to change that as positive value , is there any datatype which accepts only positive values
Use the Numeric Entry Field component and set
inputBounds.minimum : 0
inputBounds.invalidStyle.borderStyle : solid
inputBounds.invalidStyle.borderColor : --error
inputBounds.invalidStyle.borderWidth : 2
If you like that then define a style for your error, e.g., "numericError", (and use var(--error)
for the color in a style class). Then delete the direct style definitions on the component and set
inputBounds.invalidStyle.classes : numericError
Do that on all your numeric entry fields and you can control the style consistently and easily in one place.
In the tag configuration, does it work if you set the EngLow value? (I know it work on read, but not sure on write.)
A quick test in Designer shows that it does the job but generates an error message.
You need to decide a balance between obtrusive and obvious! You probably don't want the operator to think a value has been accepted and have Ignition quietly change it back to the previous value because of an out-of-range input error.