Using static text in GlobalTextList
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 align 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.
Requirement: A project with a visualization is open. The GlobalTextList object contains the texts that are defined in the project visualizations.
Double-click the visualization.
The editor opens.
Select an element with the Text property (example: Text Field).
Type in some text in the Text property (example:
Static Information A
).CODESYS adds the text to the global text list in the POU view.
Checking GlobalTextList
Requirement: A project with a visualization is open. The GlobalTextList object contains the texts that are defined in the project visualizations.
Double-click the GlobalTextList object in the POUs tree.
The table opens with the static texts.
Click
.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 in GlobalTextList
Requirement: A project with a visualization is open. The GlobalTextList object contains the texts that are defined in the project visualizations.
In the POU tree, double-click the GlobalTextList object.
The list opens with the text list entries.
Click
.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 GlobalTextList and creating current IDs again
Requirement: A project with a visualization is open. The GlobalTextList object contains the texts that are defined in the project visualizations.
Right-click the GlobalTextList object in the POUs tree and select the Delete command.
The object is removed.
Open a visualization.
Click
.In the POU view, a new GlobalTextList object is created. The global text list contains the static text from the existing project visualizations.
Removing IDs from GlobalTextList
Requirement: A project with a visualization is open. The GlobalTextList object contains the texts that were defined in the project visualizations.
Double-click the GlobalTextList object in the POUs tree.
The table opens with the texts.
Click
.CODESYS removes the text list entries with IDs not referenced in the project visualizations.
Editing GlobalTextList with a replacement file
A replacement file has the CSV
format. The first row is a header: defaultold defaultnew REPLACE
. The following rows contain the old source texts, the new source texts, and then the REPLACE
command. Tabs, commas, and semicolons are permitted separators. A combination of separator characters in a file is not permitted.
Example (tab as separator character)
defaultalt defaultneu REPLACE Information A Information A1 REPLACE
When you import a replacement file, CODESYS processes the replacement file row by row 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.
Requirement: A project is open with a text list or global text.
Double-click the GlobalTextList object.
The object opens.
Click
.The Import/Export dialog opens.
At the Choose file to compare or to import input field, click
and select the directory and file (example:
ReplaceGlobalTextList.csv
).Select the Import replacement file option.
Click OK to exit the dialog.
The texts in the text lists and the visualizations are replaced.
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:

The texts in the visualization have been replaced.
