Bargraph
This function block controls a bargraph in an HMI.
The input bShow is used to show or hide the HMI object. And the value that shall be displayed is assigned to iPos.
HMI object
The HMI object displays a horizontal or vertical bar graph, depending on the aspect ratio. If the width is equal or greater than the height a horizontal bar graph is provided. Otherwise the bar graph is vertical. At horizontal bar graphs the values rise from left to right. And the scale is displayed above the bar. The highest value of vertical bar graphs is at the top and the lowest at the bottom. In this case the scale is on the left side of the bar.
Parameter
The mask designer is called as the parameter dialog via the context menu of the block. An HMI object of the type "Bargraph" 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 …". Here the visibility and the colors of the several elements are configured. Furthermore, the minimum and maximum values and the dividing of the scale are adjusted.
Signals
Name | I/O | Type(s) | Function |
---|---|---|---|
iPos | I | WORD | Input value |
bShow | I | BIT | Show/hide object |
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.