Declarations as table

If the Declarations as tables option is activated in the Project Options (category ‘Editor’) or - if you already are working in the declaration editor - in the context menu, the declaration editor looks like a table. As in a card-index box, you can select the register cards of the respective variable types and edit the variables.

For each variable you are given the following entry fields.

Name: Input the identifier of the variable.
Address: If necessary, input the address of the variable ( AT Declaration)
Type: Input the type of the variable. (Input the function block when instantiating a function block)
Initial: Enter a possible initialization of the variable (corresponding to the “:= ” assignment operator).
Comment: Enter a comment here.

Both of the display types of the declaration editor can be changed without causing any problems. In the online mode, there are no different display types.

Insert new declaration:

In order to edit a new variable, select the ‘Insert’ ‘New Declaration’ command.

Sorting the declarations:

In order to sort the table entries, set the cursor to the line number bar at the left border of the editor window and choose one of the following commands in the context menu:

  • Sort by name: All lines are sorted alphabetically according to the identifier names in column ‘Name’.
  • Sort by address: All lines are sorted alphabetically according to the address entries in column ‘Address’.
  • Sort by type: All lines are sorted alphabetically according to the type names in column ’Type’.
  • Original order: The lines are displayed in the order in which they had been entered originally.
../_images/dd7aaac443757df90a33139006eab46b