Button

This function block controls a simple button with a labeling text in an HMI.

The input bShow is used to show or hide the HMI object. It is enabled with a HIGH signal on the input bEnable and disabled with a LOW signal. The inputs iLang, iText and sText are used to label the button. A language specific text resource (see mask designer) is selected with iLang and iText. The plain text that is connected to sText is displayed if iText is not connected or the parameter value “undefined” is assigned to it.

After pressing the button, the output bPress changes for one program cycle from LOW to HIGH.

HMI object

The HMI object displays a gray button with a black horizontally and vertically centered label.

Parameter

The mask designer is called as the parameter dialog via the context menu of the block. An HMI object of the type "Button (Unicode)" 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 …". The font and the default values for the label and the activation state are set here. A language specific text resource or a plain text can serve as label.

Signals

Name I/O Type(s) Function
sText I TEXT, DYNTEXT Plain text
iText I WORD Text resource (ID)
bShow I BIT Show/hide object
bEnable I BIT Enable/disable
iLang I WORD Language resource (ID)
bPress O BIT Button pressed

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.