Numeric Input

This function block is used to refer to an input object for numeric values in a HMI.

The input bShow is used to show or hide numeric input lines. The language of the font and text resources that have been selected in the parameter dialog is set at iLang. If the signal on nTrig changes to HIGH, the input value that is connected to sPref is checked and assigned to the object. If bTrig is not connected, the value from sPref is used only once at the start of the program. The input lBGClr can be used to set the background color and lFGClr to set the text color.

The current value of the numeric input line is written to the output sValue. The changing of the current value is signaled with an edge at the output bChge.

HMI object

The HMI object displays the left aligned current value in an input line. A modal dialog is opened in the center of the display after the input line has been clicked on. Depending on the configuration, the modal input dialog is simple or complex.

The simple dialog consists of a line, the number of keys, optional keys for the sign and the decimal point and the OK button. After opening the dialog the line is empty. The handling is similar to a calculator. The sign can be changed at any time. The dialog is moved using the caption. And the contained button is used to cancel the input.

The complex dialog displays the current value after opening. The value can be deleted character by character with the back key. Or it can be removed completely with the clear key. Because of the missing caption, the dialog cannot be moved. An additional key is provided to cancel the input.


In the parameter dialog a HMI object of the type “Numeric Input” is assigned to the function block.

Using the context menu of the function block the mask designer can be invoked as the parameter dialog. The mask designer is used to create the assignment to the HMI object. Now the preferences of the HMI object can be set with the help of the mask designer.

The parameter dialog is divided in three sections.

Global settings for the input line as well as for the modal dialog are entered in the section “General”. The initial value and the default value for the language can be specified there. The other parameters determine the length and the range of values. They influence the checking of input values. And they affect the visibility of the keys for the sign and decimal point in the dialog.

The frame type, the colors and the font of the HMI-object are configured in the section “Input line”.

The third section contains the settings for the modal dialog. Besides a simple or complex display, the font for the keypad and the keys, their colors and resource texts can be assigned for caption. The size of the line and the keys is calculated on the basis of the selected font and the assigned labels. And the dialog is automatically adapted. Furthermore a timeout can be defined. If the specified time has elapsed after the last pressing of a key or the opening, the input is automatically canceled. And the dialog is closed.



Name I/O Type(s) Function
sPref I TEXT Presetting value
bShow I BIT Show/hide object
iLang I WORD Language resource (ID)
bTrig I BIT Set sPref to the object
lBGClr I LANG Background color
lFGClr I LANG Text color
sValue O TEXT Current value
bChg O BIT Current value has been changed

Note: If inputs are not connected, the object appears with the corresponding default parameters that have been entered in the mask designer. Otherwise, the input signal from the function block overwrites the according setting from the parameter dialog.


The colored highlight in the function block indicates, whether a HMI object is assigned or not.


The function block only operates with the data type TEXT for the values. To be able to use numeric data types, converter function blocks from the adapter library have to be used.