Managing Dynamic Text in a Text List

You can create and translate texts in a text list for dynamic text in order to then display them dynamically in a visualization or in the alarm management. The object of the type Text List can be located globally in the POUs view or under an application in the Device tree and contains a table with text list entries that you can edit and extend. A text list entry consists of an ID for the identification, the source text and its translations. You can add new text list entries to a text list. Menu commands are available to you for this.

Creating text list for dynamic text display

Requirement: A project with a visualization is open.

  1. Select the POUs view or an application in the Device tree and select the command Project ‣ Add Object.

  2. Select Text List.

  3. Enter a name, for example TextList_A. Exit the dialog box with Add.

    An object of the type Text List is created.

  4. Click in the column Standard and open the input field. Enter a text, for example Information A.

    The source text is created. It serves as a key in the table and as a source text for translations.

  5. Enter any character string you like in the column ID, for example A.

    A text list entry with source text and ID is defined. If you configure the property Dynamic texts of an element in a visualization, you can now select the text list Textlist_A and assign the ID A.

  6. Double-click in the blank line at the end of the table under Standard and enter further text list entries.

    ../_images/42f8d51a278ab6eec0a8640e00213b40

Dynamically displaying text

You can configure the dynamic display of texts in a visualization that were written in a text list by configuring the property Dynamic texts of an element. You can directly assign a text list and an ID as well as IEC variables, in which you programmatically set the values.

  1. Open the text list, for example Textlist_A.

  2. Double-click the visualization.

    The editor opens.

  3. Drag an element, for the example of the type text field, into the visualization.

  4. Configure its property Dynamic Texts by selecting a text list in the property Textlist, for example 'Text_list_A' and inserting an ID from the text list for example 'A', in text index. Pay attention to the inverted commas. You can also assign an IEC variable of the type STRING for the text list name and for the ID.

    The IEC variables enable programmatic access to the texts of the text lists.

  5. Compile the application, load it to the controller and start it.

    The visualization displays the text from the text list in the text field: Information A.

See also