Declaration Editor

In the declaration editor, you declare variables in variable lists and POUs.

If the declaration editor is used with an implementation language editor, then is opens in a view above the implementation language editor.

The declaration editor offers two possible views: textual and tabular . In the Tools ‣ Options ‣ Declaration Editor dialog, you define whether only the textual view or only the tabular view is available, or whether you can switch between both views by means of the buttons on the right side of the editor view.

A rectangle selection is possible in the textual view of the declaration editor. The key combinations for the rectangle selection are located on the help page for the ST editor.

See also

Declaration editor in online mode

In online mode, you see the tabular view of the editor. The header always contains the current object path:<device name>.<application name>.<object name>. In contrast to offline mode, the table also contains the Value and Prepared Value columns.

The Value column shows the actual value on the PLC, offering monitoring functionality. If the expression is an array with more than 1,000 elements, then you can define the range of the array indices to monitor. To do this, double-click in the Data Type column to open the Monitoring Area dialog. In this dialog, the declared array range is specified as the Valid area for monitoring. A maximum of 20,000 elements can be monitored per array. You define the range of the array indices to be monitored by specifying the Start and End indices. In order to move this area more easily while maintaining the same size, the available scrollbars can be used coupled. Tot toggle between coupled and not coupled , click the symbol on the right of the bar. In non-coupled state, you can increase or decrease the size of the area to be monitored as desired.

The Prepared Value column contains the value that you prepared for forcing or writing.

If you double-click a Prepared value field, then you can specify a value explicitly for writing or forcing. In the case of enumerations, a combo box opens from which you can select a value. In the case of a Boolean variable you can toggle the prepared value with the help of the Enter key or the Space bar. If an expression (variable) is of a structured data type, for example the instance of a function block or an array variable, then a plus or a minus sign is placed in front.

You can customize the format of the representation of floating-point values in the options for monitoring.

See also