Cross reference

The cross-reference checks the project for the use of variables, texts and rights and indicates potential errors.

You can use the cross-reference, for example, to check the project to see whether the variables that are linked in the control elements exist in the project file. If this is not the case for a variable, an error is displayed for this variable. You can then "jump" to the source of the error from the cross-reference, correct the variable connection and thus avoid a system error at runtime.

Open editor

The cross-reference can be found in the project explorer as the last entry in the project configuration node of a project. Each project has its own cross reference.

To open the cross-reference editor, you have the following options:

The editor is opened in a tab in the centre of the development environment.

Control elements

The cross-reference editor has the following controls:

Editor of the cross reference

Tab

A separate editor is opened for each project on a tab in the centre of the program window of the development environment.

For example, you can drag a single tab out of the development environment to display it in a separate window or organise tabs into groups. For more information, see Tabs.

Toolbar

Contains the general functions and functions for filtering the results.

View

The scan results are displayed here. There is one view each for variables, texts and rights. To display the results for variables in the editor, for example, click on the Variables sub-node of the cross-reference in the project explorer.

Search

You can reduce the results list to the results that contain a specific character string within the first column. To do this, type this character string into the search field. The number of hits is displayed in an output field next to the search field.

Show and hide details

The variables, texts etc. (nodes) found are highlighted in light yellow. You can expand each node by clicking on the plus symbol to display further information, e.g. a more detailed description of the error and where it occurs. You can hide the information by clicking on the minus symbol .

Columns

You can make each column in the table wider or narrower, just like in the table editor, or double-click to make it fit exactly. You can sort the results by clicking on the column header. Detailed information on the results is displayed in the columns.

Status bar

Indicates the time of the last analysis and the number of errors, warnings and correct usages in the table.

The filter for warnings is hidden by default for variables and texts in the toolbar. Warnings for variables and texts are also not counted in the status bar. If you want to use the filter for warnings for variables and texts and have the number of warnings displayed in the status bar, you can set this in the Optionsdialogue. To do this, expand the Development environment node in the dialogue, select the "Cross reference" view and activate the options "Variable defined but not used" and "Localised text defined but not used".

Scan project

If the cross-reference editor is open, select the desired view, e.g. "Variables" below the Cross-reference node in the project explorer and click on the (scan project) or (rescan project) button in the editor toolbar.

The results are displayed in a table.

Results for variables

Filter results

The toolbar contains filter functions that filter the results in the table by status.

When you open the cross-reference editor, all filters (except for the "Show system texts" filter in the "Texts" view) are initially activated. This means that the list of results is usually quite long. You can filter the results for a systematic check. To do this, click on the desired filter in the toolbar to activate or deactivate it.

For example, if you only want to see results with the status "Error", leave only the switch activated and deactivate the others.

Sort results

You can sort the displayed data records in ascending or descending order by clicking on the desired column header. A small triangle pointing upwards or downwards in the column header indicates the corresponding sorting (upwards: ascending sorting, downwards: descending sorting).

If you want to sort the data records by status, for example, click once on the "Status" column header. The data records are sorted in the order correct-warning-error (ascending). If you click on the "Status" column header a second time, the data records are sorted in the order error-warning-correct (descending).

You can sort as follows in the "Status description" column:

Alphabetical sorting is used in all other columns (ascending: A-Z, 0-9; descending: Z-A, 9-0).

Show details

To examine a data record in more detail, first expand the desired data record by clicking on the plus symbol to display the relevant information. You can also expand all displayed data records at once by clicking on (Open all nodes) in the toolbar. Errors are highlighted in red, warnings in yellow.

In the expanded view, the exact information on a data record is visible in the columns "Status description", "System", "Used in" etc.

Navigate to the source

If you have expanded a data record, you can navigate directly to the source of a usage:

  1. Double-click on the desired row in the cross-reference editor; the column is irrelevant.

  2. Click once on the line and click on (Show definition) in the editor toolbar.

  3. Right-click on the line and select "Show definition" from the context menu.

If the usage can be found on a page, this page is opened in the Designer. If the usage can be found in a definition (e.g. in an alarm), this definition is opened and selected in the table editor.

Correct errors and update cross-reference

Once you have corrected the error, e.g. specified the correct variable in the "Variable name" property of the control, save the document in the Designer and scan the project again to update the cross-reference data.

You can have documents saved automatically in the Designer. To do this, open the Options dialogue, expand the Designer node in the dialogue, select the "Documents" view and activate the "Save documents automatically" option. You can also set the time period after which documents are automatically saved here. Confirm your changes with OK.