Skip to main content

Example: Virtual Keyboard and Virtual Numeric Keypad

Product: CODESYS Visualization

The example describes how a virtual keyboard or a virtual numeric keypad for user input can be integrated into any visualization.

Description

As a substitute for real input devices, visualizations representing the keyboard and numeric keypad and allowing user input using a mouse or a touch screen can be integrated into your application.

_visu_img_call_virtual_keypad.png
_visu_img_call_virtual_numpad.png

Additional information

PLC_PRG: Program where the variables for user input are declared. It is accessed in write mode when user input is done using the virtual keyboard or the virtual numeric keypad.

Visualization: The visualization consists of three fields. The fields have an input configuration which responds to an "OnMouseClick" event. The input variables are passed there.

Runtime behavior: When one of the fields is clicked, either a numeric keypad or a keyboard is displayed.

  • A numeric keypad is displayed in the first field, allowing the entry of integer values within an upper and lower limit.

  • A numeric keypad for entering numbers in floating point format is displayed in the second field.

  • In the third field, a keyboard is displayed for entering letters and texts which are written to a string variable.

Tip

The input configuration of a visualization element is displayed in the Properties view under Input configuration .

System requirements and restrictions

Programming system

CODESYS Development System (version 3.5.14.0 or higher)

Runtime system

CODESYS Control Win (version 3.5.14.0)

Add-on components

-

Note

_example_icon.png DOWNLOAD Project