Bounds issue with Numeric Text Field / Numeric Keypad

I am using V 7.7.5 and have a window that I’m designing for an operator to use numeric keypads to enter values into a numeric text fields. These values must be bounded with and out of bounds error message some staying between 0 - 9999 and others 10000 - 60000 . I have tried to bind to the numeric text field.intValue and the OPC tag.intValue but my entries still go over bounds with no error. I’ve also tried bounding to the minimum and maximum values without success either. There are thirty seven total numeric keyad inputs for numeric text fields in this window. When the keypad opens its header does not display any information. For example the header displays no title for which text field is open. Is there a way to label the header in the numeric keypad so the operator does not become confused? If I could get assistance with these two issues it will be greatly appreciated.

Hi Jim,

Two things:

  1. Do you have both the ‘Use Bounds’ and ‘Error on Out-of-Bounds’ properties set to true? Without both of those enabled this feature will not work.

  2. Unfortunately, it is not possible to add a header to the numeric keyboard. There is a way to add a script that will make it more obvious which text field you’re currently editing. You can use the ‘focusGained’ event handler in the Component Scripting interface to set a header (i.e. “editing text box 11”) at the top of your page. If you create a label on the window, here’s the script you could set on a numeric text field to make that work:

event.source.parent.getComponent(‘Label 1’).text = "Editing " + str(event.source.name)

Use Bounds and Out of Bounds are both checked and set to true. I am able to duplicate using a pc keyboard as well. The “focusGained” event worked.

Update:
I did get it to work. It seems that when your writing to a PLC tag the Out of Bounds does not work at all. Using Bounds is limited to a script when writing to PLC tags which is an example that I have below:

if intValue > 60000: errorMessage = "The value entered is out of bounds. Range 10,000 - 60,000" system.gui.errorBox(errorMessage, "Out of Bounds") event.source.parent.getComponent('Numeric Text Field 37').intValue = 60000 elif intValue < 10000: errorMessage = "The value entered is out of bounds. Range 10,000 - 60,000" system.gui.errorBox(errorMessage, "Out of Bounds") event.source.parent.getComponent('Numeric Text Field 37').intValue = 10000 else: system.tag.writeToTag('AOD/AOD_OVERHEAD/L2_TO_AOD_PLC/L2_TO_AOD_PLC_27_', intValue)

The feature request forum is locked. Is there anyway to request to have the “Use Bounds” and “Error on Out of Bounds” features function when writing to a PLC tag?

We closed the feature request portion of the forum and have replaced it with the new Feedback Portal. Feature requests can be voted up by other forum members and you can vote on features that you think should be implemented. The developers monitor this portal directly.