Slider
This function block controls a slider in an HMI, via which the user can specify an input value.
The input bShow is used to show or hide the HMI object. It is enabled or disabled via the input bEnable. If a HIGH signal is connected to the input bSet the value at IPos is checked and the slider is repositioned to the next valid value.
The current position of the slider is provided at the output OPos.
HMI object
The HMI object displays a horizontal, from left to right running or a vertical, from top to bottom running slider. The alignment depends on the aspect ratio. If the width is equal or greater than the height a horizontal slider is provided. Otherwise the slider is vertical. The scale of horizontal sliders is below the stylized lever. At vertical sliders it is on the left side.
The position of the slider is changed by dragging the lever or clicking to any point in the HMI object. When a scale is available the positions can be limited to the tics.
Parameter
The mask designer is called as the parameter dialog via the context menu of the block. An HMI object of the type "Slider" is assigned to the block by creating or selecting it. With the checkbox in the lower left corner you can switch between global and instanceable assignment.
Default settings for the HMI object are made in the corresponding dialog, which appears after "Additional settings …". Besides the minimum and maximum values and the default value for the position also the activation state and graphic attributes are adjusted here. The background can be transparent or filled with a color. Furthermore, the object can be framed with black lines. Or it can be raised or recessed.
The slider can contain a scale. The number of the tics and their color are entered in the dialog. A dividing is valid when every tic marks a valid WORD value.
Signals
Name | I/O | Type(s) | Function |
---|---|---|---|
IPos | I | WORD | Presetting value |
bShow | I | BIT | Show/hide object |
bEnable | I | BIT | Enable/disable |
bSet | I | BIT | Set IPos |
OPos | O | WORD | Current value |
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.
Visualization
The assignment of the HMI object is displayed in the block by the color of the text boxes. A yellowish background indicates a global assignment. If the assignment is instanceable, the background is white. And at missing or incorrect assignment it is red.