Beckhoff Automation GmbH & Co. KG TX1200 — 5.1 Declaration Editor

Editors For each of the three possible dimensions ( Dim .), array boundaries can be entered under Start and End by clicking with the mouse on the corresponding field to open an editing space. The array data type is entered in the Type field. In doing this, the button... can be used to call up an input assistant dialog. Upon leaving the array boundaries dialog via the OK button, variable declarations in IEC format are set up based on the entries in the Type field in the dialog. Example: ARRAY [1..5, 1..3] OF INT In the field Initial value , you may enter the initial value of the variable being declared.

If this is an array or a valid structure, you can open a special initialization dialog via the button or , or open the input assistant dialog for other variable types. In the initialization dialog for an array you are presented a list of array elements; a mouse click on the space following „:=“opens an editing field for entering the initial value of an element. In the initialization dialog for a structure, individual components are displayed in a tree structure. The type and default initial value appear in brackets after the variable name; each is followed by „:=“. A mouse click on the field following „:=“ opens an editing field in which you can enter the desired initial value.

If the component is an array, then the display of individual fields in the array can be expanded by a mouse click on the plus sign before the array name and the fields can be edited with initial values. After leaving the initialization dialog with OK, the initialization of the array or the structure appears in the field Initial value of the declaration dialog in IEC format. Example: x:=5,field:=2,3,struct2:=(a:=2,b:=3) In the Address field, you can bind the variable being declared to an IEC address (AT declaration). If applicable, enter a Comment. The comment can be formatted with line breaks by using the key combination + .

By pressing OK, the declaration dialog is closed and the variable is entered in the corresponding declaration editor in accordance to the IEC syntax. The dialog box for variable declaration you also get by the command 'Edit' 'Declare Variable' (see Chapter Editing Functions). If the cursor is resting on a variable in Online mode, the Autodeclare window can be opened with with the current variable-related settings displayed. Line Numbers in the Declaration Editor In offline mode, a simple click on a special line number will mark the entire text line.

In the online mode, a single click on a specific line number will open up or close the variable in this line, in case a structural variable is involved. Both of the display types of the declaration editor can be changed without causing any problems. In the online mode, there are no differences for the display. Declaration Editor as a Table TX1200 122 Version: 1.3 Name Input the identifier of the variable. Address 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.