This might be a bit of a lengthy answer, but I think it will meet your need. I would start with a template based on this statement.
Using a template assumes that all the displays have a similar structure.
The template will have several parameters. One will be the tag path to the setpoint value (I assume you’re storing the setpoint in a tag). In the template you can use an indirect binding to show the value of the setpoint and, as described below, you can use this path in a script to pop the keypad and set the setpoint.
The script you write will be part of the template as well. It should go on the root of the template. I think the mousePressed event would be appropriate, but you should test to determine what works best with your physical setup (touchscreen vs mouse, etc.). To make sure the script is called for a mouse press anywhere in the template, make sure none of the components in the template also have a mouse event script. The script you write will need to:
- Consume the custom property created earlier (the tag path to the setpoint value)
- Call system.gui.showNumericKeypad to get the new setpoint value
- Call system.tag.writeBlocking to write the new setpoint value to the setpoint tag.
- You’ll also want to be sure to handle the case where showNumericKeypad returns None (operator pressed cancel on the keypad) as well as any input that isn’t allowed (decimal places where they setpoint is an integer).
There will be more custom parameters (Current process value, units, title), but this lets you apply one solution to all of the displays. If the displays really aren’t that similar, you can accomplish the same thing by following these steps using a container instead of a template.