Managing Static Text in Global Text Lists

The global text list is the central location in the project for texts, which are output in the visualization.

If a text in a visualization element for the first time, TwinCAT automatically creates a global text list. It is added to the PLC project tree as an object and will only exist once. You can open the global text list by double-clicking on the object in an editor.

The global text list contains a table will all static texts you have written in the project visualizations. If you write a further text in a visualization element under the Texts property, TwinCAT amends the table automatically. TwinCAT assigns the IDs as consecutive integer numbers, beginning with 0.

You can check, update and synchronize the global text list against the static texts of the visualizations. Here, the options are limited to editing and translating existing text, i.e. it is not possible to write new text. The source text or the ID cannot be edited directly in the table, although a source text can be replaced with another text by creating a replacement file and importing it. Menu commands are available for this purpose.

TwinCAT provides the following commands for consolidating the GlobalTextList:

See also:

Structure of a global text list

Symbol: Managing Static Text in Global Text Lists 1:

Managing Static Text in Global Text Lists 2:

ID

Unique text identifier

Standard

Source text as string with a maximum of one formatting specification, e.g. information A: %i options. If no translation is written in a language column, TwinCAT uses this text.

Double-click in the field to edit the text.

The table contains any number of language columns you may have added. A language column is identified with a language code, which you specified when you created the column with the Add Language command.

<language code>

Name of the language in the form of a language code, e.g. en-US. This column contains the translation of the text written under Default.

If a language code is selected in the visualization manager, a visualization issues the translation during operation. A visualization during operation can switch to another language on request by a user.

Double-click in the field to edit the text.

Configuring a visualization element with static text

A text in a GlobalTextList may contain a formatting specification.

A project with visualization is open. The GlobalTextList object contains the texts that are defined in the visualizations of the project.
1. In the PLC project tree, double-click on the visualization.
The editor opens.
2. Select an element that has the Text property, for example a text field.
3. Enter a text in the Text property, for example “Static Information A”.
TwinCAT extends the global text list in the POU view with the new text.

Checking the global text list

A project with visualization is open. The GlobalTextList object contains the texts that are defined in the visualizations of the project.
1. In the PLC project tree, double-click on the GlobalTextList object.
The table containing the static texts as list entries opens.
2. In the Textlist menu or the context menu of the editor, select the command Check Visualization Text Ids.
TwinCAT indicates if an source text from the text list differs from the static text that is identified via the ID. The source text in the global text list does not match the text in the visualizations with the same ID.

See also:

Updating the IDs in the global text list

A project with visualization is open. The GlobalTextList object contains the texts that are defined in the visualizations of the project.
1. In the PLC project tree, double-click on the GlobalTextList object.
The table containing the static texts as list entries opens.
2. In the Textlist menu or the context menu of the editor, select the command Update Visualization Text Ids.
TwinCAT supplements the global text list, if a text in the static text property does not match a source text in the project visualizations.

See also:

Removing IDs from the global text list

A project with visualization is open. The GlobalTextList object contains the texts that were defined in the visualizations of the project.
1. In the PLC project tree, double-click on the GlobalTextList object.
A table with the texts opens.
2. In the Textlist menu or the context menu of the editor, select the command Remove Unused Text List Records.
TwinCAT removes the text list entries, whose IDs are not referenced in the project visualizations.

See also:

Edit global text list with replacement file

A replacement file has the format .csv. The first line is a header: defaultold defaultnew REPLACE. The other lines contain the old source text, the new source text and the command REPLACE. Tab, comma or semicolon is allowed as a separator. A mixture of separators within a file is not allowed.

Sample (tab as separator):

defaultalt     defaultneu      REPLACE
Information A  Information A1  REPLACE

If you import a replacement file, TwinCAT processes the file line-by-line and implements the specified substitutions in the GlobalTextList. In addition, TwinCAT replaces the previous text in the visualizations with the replacement text. If the replacement text was already available as static text, TwinCAT recognizes this, harmonizes the static texts and leaves only one text list entry.

A project with a text list or a global text list is open.
1. In the PLC project tree, double-click on the GlobalTextList object.
The object opens.
2. In the Textlist menu or the context menu of the editor, select the command Import/Export Text Lists.
The Import/Export dialog opens.
3. Under Choose file to compare or to import, click on Managing Static Text in Global Text Lists 3: and select a directory and a file name, e.g. “ReplaceGlobalTextList.csv”.
4. Enable the option Import replacement file.
5. Quit the dialog with OK.
The texts in the text lists and the visualizations are replaced.

Sample:

The global text list contains the following source texts:

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

The replacement file contains the following substitutions:

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

TwinCAT detects duplicate text list entries and removes one of them. The global text list then contains the following entries:

Managing Static Text in Global Text Lists 4:

The texts in the visualization have been replaced.

Managing Static Text in Global Text Lists 5:

See also: