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.
Requirement: A project is open with a visualization. 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 the global text list
Requirement: A project is open with a visualization. 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 “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
Requirement: A project is open with a visualization. The “GlobalTextList” object contains the texts that are defined in the project visualizations.
-
Double-click the “GlobalTextList” object in the POUs tree.
The list opens with the text list entries.
-
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
Requirement: A project is open with a visualization. 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 “Visualization Create Global Text List”.
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 the global text list
Requirement: A project is open with a visualization. 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 “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 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)
defaultold defaultnew 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 “Text List Import/Export Text Lists”.
The “Import/Export” dialog opens.
-
At the “Choose file to compare or to import” input field, click for more (
) and select the directory and file (example:
ReplaceGlobalTextList.csv
). -
Select the “Import replacement file” check box.
-
Click “OK” to close the dialog.
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 Counter: %i GlobalTextList Information A GlobalTextList Information a GlobalTextList Information Aa GlobalTextList Switch
The replacement file contains the following replacements:
defaultold defaultnew REPLACE Counter: %i Counter2: %i REPLACE Counter: %i Counter2: %i REPLACE Information A Information A2 REPLACE Information a Information A2 REPLACE Information Aa Information A2 REPLACE Switch 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.
