Multi Color Bar

This function block is used to refer to a specific bar in a HMI, which is comprised of a multitude of colored segments.

The input bShow is used to show or hide the HMI object. The input lCInp is connected to a vector containing the color values for the bar. The number of elements of this vector defines the number of segments of the multi color bar. If this input is not connected, the bar will not be drawn. A change from LOW to HIGH on the input bTrig will update the bar with the current values from the color vector.

Because this object can also be used as a button, the output bPress indicates a button use.

HMI object

The HMI object displays a horizontal bar which is divided into any number of equally large segments. Every segment can have its own color. The object registers mouse clicks and therefore is able to work as a button. It is possible that only a part of the height of the object is drawn as the bar.

Parameters

In the parameter dialog a Multi Color Bar HMI object 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 of the object is used to define the height of the bar. A value of 0 or higher than the total height of the object means, that the total height of the bar will be drawn.

Signals

Name I/O Type(s) Function
lCInp I LONG Vector with the color values
bShow I BIT Show/hide the object
bTrig I BIT Update the color bar
bPress O BIT Indicates use as a button

Visualization

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

Comments

Even if only a part of the height of the object is drawn, the complete field of the object is used as a button.