This function block controls a mask in an HMI that defines an area serving as background for other objects.

The input bShow is used to show or hide the mask. The background color is changed at input lBGClr. A palette index (0-255) is expected at 8-bit color depth and a BGR-value (blue-green-red) at 24-bit color depth. It is provided e.g. by the color parameter block as of library version 7.0.

A language specific bitmap resource can be assigned with the help of the inputs iLang and iBmp. The background picture is so arranged that top left corners of the mask and the bitmap suit.

The output bPress changes for one program cycle from LOW to HIGH after clicking the mask or an inserted object that does not process user inputs or is disabled.

The input idParen and the output idMask are used to change the mask hierarchy. The identification number of the mask that is assigned to the function block is provided at output idMask. If it is connected with the input idParen of a second mask block then the mask of the second function block becomes a child of the mask of the first block. It should be taken into account that the display area of child masks is limited to the size of the parent mask and that children are only displayed when the parents are visible.

The inputs bShow and idParen have no effect on the background window. This is a special mask that is always visible and the parent of all other masks.

HMI mask

The HMI mask is a rectangular area that contains other objects and masks. It is used to create different views in the HMI.


The mask designer is called as the parameter dialog via the context menu of the block. A mask 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 mask are made in the corresponding dialog, which appears after "Additional settings …". Here, the default background color and the language and bitmap resource IDs of the background image are assigned.


Name I/O Type(s) Function
idParent I WORD Parent mask (ID)
iBmp I WORD Bitmap resource (ID)
bShow I BIT Show/hide object
iLang I WORD Language resource (ID)
lBGClr I LONG Background color
idMask O WORD Mask (ID)
bPress O BIT Click signal

Note: If inputs are not connected the mask 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 in the parameter dialog.


The assignment of the mask 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.