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

Editors If no type has been established through these rules, then the type is BOOL and the last identifier will not be used as a type (Example 1.). Every constant, depending on the type of declaration, will turn into an initialization or a string (Examples 2. and 3.). An address (as in %MD12) is extended around the AT... attribute (Example 4.). A text after a semicolon (;) becomes a comment (Example 4.). All other characters in the line are ignored (e.g., the exclamation point in Example 5.). Examples: Autodeclaration If the Autodeclaration of the options dialog box , then a dialog box will appear in all editors after the input of a variable that has not yet been declared.

With the help of this dialog box, the variable can now be declared. Dialog to declare variables With the help of the Class combobox, select whether you are dealing with a local variable ( VAR ), input variable( ( VAR_INPUT ), output variable ( VAR_OUTPUT ), input/output variable ( VAR_IN_OUT ), or a global variable ( VAR_GLOBAL ). With the CONSTANT and RETAIN options, you can define whether you are dealing with a constant or a retain variable. The variable name you entered in the editor has been entered in the Name field, BOOL has been placed in the Type field. The button... opens the Input Assistant dialog which allows you to select from all possible data types.

If ARRAY is chosen as the variable type, the dialog for entering array boundaries appears. Declaration editor for arrays TX1200 121 Version: 1.3 Short Description Declaration A A: BOOL; A B I 2 A, B: INT := 2; ST S 2; A String ST: STRING(2); (* A String *) X %MD12 R 5; Real Number X AT %MD12: REAL := 5.0;(* Real Number *) B ! B: BOOL;