List Box

This function block is used to refer to a list box in an HMI, which allows the user to select an element form the listed content.

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 bSelect and IIndex are used to select a list element. If a HIGH signal is connected with bSelect then IIndex determines the position of the selected element. No element is selected when an invalid index is written to IIndex. A LOW-HIGH edge at the inputs bUp and bDown scrolls the list page by page up and down. A HIGH signal is written to the outputs bUpEnab or bDwEnab when it is possible to scroll in the corresponding direction.

The inputs iNBmp, iSBmp, iText, sText and IData are used to create new or change the existing list elements. The first element of each vector that is connected with one of these inputs configures a feature of the first list element. So, the second element of the vectors define the second list element and so on. The bitmaps for not selected list elements are set at input iNBmp. And the vector that is connected with iSBmp defines the bitmaps of the selected elements. The labels are specified at the inputs iText and sText. And the vector at IData contains the data for the list elements. If a HIGH signal is written to bSet then the settings in the vectors are assigned. The existing list elements will be changed or new ones will be added. The number of list elements after the assignment corresponds to the minimum length of the connected vectors. If some inputs are not connected, the values of the predefined elements or default values are used. Resource texts prevail over plain texts and combinations of data and plain texts, i.e. if a resource ID different to “not defined” is assigned, the corresponding resource text is displayed.

The language of the bitmap and text resource is set at input iLang. The index of the selected element is written to OIndex. If no element is selected, -1 is the output. The data of the selected element are provided at OData. The length of the output is limited to 17 characters.

HMI objects

The HMI object displays a vertical list with single element selection. Two bitmaps for the states “selected” and “not selected” as well as a text can be assigned to every list element.


In the parameter dialog an HMI object of the type “List Box (unicode)” is assigned to the function block.

By 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 by using the mask designer.

The parameter dialog of the object consists of two views. The tabs in the upper left corner are used to switch between the views.

Global settings for the HMI object and list elements are entered in the view “General”. The frame and the background color of the list box as well as the default value for the language and the font for the text outputs belong to them. Different background colors can be assigned to selected and not selected list elements. Not only selections but also an enabled or disabled list box can be highlighted with the text color. The default values for the alignment of the bitmaps and texts as well as for the display of data and plain texts are used to uniformly configure all predefined elements. This setting will also be used, if further elements are added to the list via the function block. The height of the elements is specified in pixels. After activating the option “Adjust the object height” the list box is shortened to a multiple of the height of the elements. The other option is used to disable the list box.

The second view contains the predefined elements. The context menu provides commands for the adding of new elements as well as the editing, deleting, selecting and moving of existing ones.

The definition of the single elements happens in its own dialog. The index of the list element is specified after “Item-ID”. The first element gets the index 0. The option “highlighted” is used to select the element. Furthermore the two bitmaps, a text and a data string can be assigned. The element can be labeled with a resource text, a plain text or a combination of data and plain text. If a resource text is specified then it will be output. The plain text or a combination of data and plain text are only displayed if the resource text is set to “not defined”. The output of the plain text and the data is configured in the “Display” setting. Every list element can get its own alignment and display parameter. The global parameter will be used if “default” is chosen. Then all elements can be uniformly formatted.


Name I/O Type(s) Function
sText I TEXT Plain text vector for labeling the elements
iText I WORD Text resource vector (ID) for labeling the elements
iData I WORD Data vector for the elements
iSBmp I WORD Bitmap resource vector (ID) for selected elements
iNBmp I WORD Bitmap resource vector (ID) for not selected elements
IIndex I WORD Index of the element that is to select
bSelect I BIT Select the entry IIndex
bShow I BIT Show/hide object
bEnable I BIT Enable/disable
iLang I WORD Language resource (ID)
bSet I BIT Set the element definitions
bUp I BIT Scroll upwards
bDown I BIT Scroll downwards
OIndex O WORD Index of the selected element
OData O TEXT Data of the selected element
bUpEnab O BIT State for scroll up
bDwEnab O BIT State for scroll down


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


The index of the elements always starts with 0.