Skip to main content
Skip table of contents

Number field

The following input options are available:

Numpad: Input via number field.
NumpadFull: Input via number field. Background semi-transparent and not operable.
NumpadNetworkFull: Input via number field. Input for IP addresses.

Numpad

The following structure variables are required.

VAR
// Example for Numpad
tNumpadInOut : JCmpVisuBasic.stNumericKeypadInOutType;
stNumpadIn : JCmpVisuBasic.stNumericKeypadInType;
END_VAR

Your own input object is created first. In the properties Text variable, the variable wsValue of the structure variable e.g. stNumpadIn is entered. In order for the text in this object to be displayed at all, “%s” must be entered under Text.

image-20240116-122902.png

As the next point, the function OnMouseClick must be opened under Input configuration.

image-20240116-123728.png

First the function Execute ST-Code is added and then the variable xInitNumpad is set to true.

image-20240116-123157.png

Furthermore, the function Open Dialogue is added. The required number field is selected under Dialogue. For the parameters stIn and stInOut, the structure variables defined in your own program are transferred. Finally, the options for OK and Cancel must be selected.

image-20240116-125150.png

The structure variable JCmpVisuBasic.stNumericKeypadInType contains the following variables:

:No1: wsValue: Entered string value
:No2: wsMax: Max. input limit as string value or string variable.
:No3: wsMin: Min. input limit as string value or string variable
:No4: wsTitle: Title for the input window as wString or wStringvariable.
:No5: wsUnit: Unit as wString or wStringvariable is displayed behind the title.
:No6: iDecimalPlaces: Number of decimal places
0 no decimal place
1 one decimal place
2 one decimal place
3 one decimal place

image-20240116-131521.png

The structure variable described above can be described in your own program as follows.

:No1: Only two structure variable that need to be declared are required.

:No2: Parameters required for input on the numpad.

:No3: This code is important so that the last value entered can be displayed correctly.

image-20240116-130243.png

NumpadFull

The difference to the Numpad is that on the NumpadFull the background is semi-transparent and not operable.

image-20240116-132749.png

NumpadNetworkFull

The NumpadNetworkFull number field is suitable for inputting IP addresses.

In contrast to the other two number fields, only the variables for min, max and the title are required here. “0.0.0.0” is entered for the min. limit and “255.255.255.255” for the max. limit.

image-20240117-075950.png

The finished input looks like this:

image-20240117-080141.png

 

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.