Managing Static Text in Global Text Lists

The global text list is the central location for texts that are displayed in the visualization.

When you configure a text for the first time in visualization element, CODESYS creates the global text list. CODESYS fills in the table as you create more texts. Therefore, the table includes all texts automatically that you create in the project visualizations. CODESYS assigns incremental IDs as integers, beginning at 0.

You can check, update, and compare the global text list with the static texts of the visualization. You cannot edit the source text or the ID directly in the table. However, you can replace a source text with another source text by creating and importing a replacement file. Menu commands are provided for this purpose.

Configuring visualization elements with static text

A text in a GlobalTextList can contain a format definition.

  1. Double-click the visualization.

    The editor opens.

  2. Select an element with the Text property (example: Text field).

  3. Type in some text in the Text property (example: Static Information A).

    CODESYS adds the text to the global text list in the POUs view.

Checking the global text list

  1. Double-click the GlobalTextList object in the POUs tree.

    The table opens with the static texts.

  2. Click Text List ‣ Check Visualization Text IDs.

    CODESYS reports when a source text of the text list does not match the static text that is identified by the ID. The source text in the global text list and the text in the visualization with the same ID do not match.

Updating IDs of the global text list

  1. Double-click the GlobalTextList object in the POUs tree.

    The list opens with the text list entries.

  2. Click Text List ‣ Update Visualization Text IDs.

    CODESYS adds text to the global text list when a text in the Static Text property does not match the source text in the project visualizations.

Removing the global text list and creating current IDs again

  1. Right-click the GlobalTextList object in the POUs tree and select the Delete command.

    The object is removed.

  2. Open a visualization.

  3. Click Visualization ‣ Create Global Text List.

    In the POUs view, a new GlobalTextList object is created. The global text list contains the static text from the existing project visualizations.

Removing IDs from the global text list

  1. Double-click the GlobalTextList object in the POUs tree.

    The table opens with the texts.

  2. Click Text List ‣ Remove unused text list entries.

    CODESYS removes the text list entries with IDs not referenced in the project visualizations.

Updating the global text list with a replacement file

A replacement file has the CSV format. The first line is a header: defaultalt defaultneu REPLACE. The following lines contain the old source texts, the new source texts, and then the REPLACE command.

defaultalt\ \ defaultneu\ REPLACE
Information A\ Information A1\ REPLACE

When you import a replacement file, CODESYS processes the replacement file line by line and performs the specified replacements in the GlobalTextList. In addition, CODESYS replaces the previous text with the replacement text in the visualizations. If the replacement text already exists as static text, then CODESYS recognizes this and harmonizes the static text and leaves only one text list entry.

  1. Double-click the GlobalTextList object.

    The object opens.

  2. Click Text List ‣ Import/Export Text Lists.

    The Import/Export dialog box opens.

  3. At the Choose file to compare or to import input field, click for more ( e45cde425a0e47b6c0a8640e0087c545_2be833ef7deb1e6ec0a8640e0056e76c ) and select the directory and file (example: ReplaceGlobalTextList.csv).

  4. Select the Import replacement file check box.

  5. Click OK to close the dialog box.

    The texts in the text lists and the visualizations are replaced.

Example

The global text list contains the following source texts:

GlobalTextList\ \ Counter: %i \ \
GlobalTextList\ \ Zähler: %i
GlobalTextList\ \ Information A\
GlobalTextList\ \ Information a\
GlobalTextList\ \ Information Aa\ \
GlobalTextList\ \ Umschalten\ \

The replacement file contains the following replacements:

defaultalt\ \ defaultneu\ \ REPLACE
Counter: %i\ \ Counter2: %i\ REPLACE
Zähler:  %i\ \ Counter2: %i\ REPLACE
Information  A\ Information A2\ REPLACE
Information  a\ Information A2\ REPLACE
Information Aa\ Information A2\ REPLACE
Umschalten\ \ Switch2\ \ \ REPLACE

CODESYS detects duplicate text list entries and removes them. Afterwards, the global text list contains the following source texts:

../_images/f26c9cf26eea108fc0a8640e00877266

The texts in the visualization have been replaced.

../_images/05131b9d6eee2147c0a8640e00f97aa6

See also