Store PLCnext CommunityPLCnext on LinkedInPLCnext on Instagram  PLCnext on YouTube Github PLCnext CommunityStore PLCnext Community

 

 How to create a Blog Entry

On-screen Keypad with PLCnext Engineer eHMI

This demo project shows how to create a custom keypad for use with the eHMI in PLCnext Engineer.  This was developed as a work-around for the BWP 2000 series HMI touch screens, but will work with the WP 4000 series touch screens as well.

Keypad Example

The BWP 2000 series touch screens only have a full on-screen keyboard; there is no keypad option.  The on-screen keyboard can be moved from the bottom of the screen to the top of the screen so that it does not cover the input field, but in many scenarios it is desirable to have a numeric keypad.

The WP 4000 series touch screens have a full on-screen keyboard and a numeric keypad.  However, PLCnext Engineer is not able to use the built-in numeric keypad.  Even more challenging is the fact the full on-screen keyboard cannot be moved and often will cover the input field.

History

2019.0 LTS

This project was originally created in PLCnext Engineer 2019.0 LTS with the help of Tim Wicker of Phoenix Contact USA.  This was created for a specific customer application that only had a single numeric input field.

2021.0 LTS

The sample project was updated to PLCnext Engineer 2021.0 LTS as this allows the use of parameters, tags, and simple expressions in the eHMI. It is now possible to use a single instance of the custom keypad with many numeric input fields.

Implementation

    1. Download the sample project here.
    2. Import the "Keypad" eHMI Page and the NumericKeypad Function Block into your project.
    3. Add an instance of the "NumericKeypad" Function Block to a Program.  This Program should be scheduled in a Task with an Interval that is twice as fast as the eHMI Data poll interval.
    4. Use a "Text" object, not a "Text Input" object, in your HMI where a numeric value entry field is needed.
    5. Add an "Action on Click" dynamic to this "Text" object.
      • Set the "Action" to "Open dialog".
      • For "Page" select "Keypad".
      • Optionally, check the box to "Dim background".
      • Select your desired variable as the Source Value for the Parameter "iOutput".

Text dynamics

Repeat steps 4 and 5 to add as many input fields as needed for your application.

 

Limitations

This demo project has the following known limitations:

  • No support for negative numbers
  • Only support for data type INT
  • There is no indication of the input field the user clicked

These known limitations can be resolved by modifying the demo project.

There may be additional limitations or challenges that have not been identified.  User assumes all liability and responsibility when using this demonstration project.