AX - 3 S e r ie s O p e r a t i o n M a n u a l
4 - 3 0
_4
Variables
Rules for identifiers of variables:
No spaces or special characters
Not case sensitive (For example, Var0 and VAR0 are seen as the same variable)
No multiple consecutive underscores (For example, b__Var0 is not permitted)
Rules for multiple use of identifiers
Local variable cannot be declared more than one time.
If a local variable and a global variable share the same name, the local variable has priority within the POU.
Variables with the same name can be declared in different global variables list.
(For example, globe
_list1
.bvar and globe_list2.bvar can co-exist in two different global variables lists.)
Comments
Single comment: the symbol // indicates a single comment, for example: // Variable Define
Multiple comments: the symbol (* XX : XX *) indicates multiples comments from XX to XX, for example (* Variable
Define : Variable Define*)
4.3.2.1
Declaration of Variables
In DIADesigner-AX projects you can declare variables in the following methods.
Syntax: <Variable Name> : <Data Type> := <Initialization> ;
Example:
Array
Syntax
:
<Variable Name>
:
ARRAY[0..N] OF <Data Type>
Example:
Summary of Contents for AX-3 Series
Page 17: ...AX 3 Series Operation Manual 1 10 _1 MEMO...
Page 54: ...AX 3 Series Operation Manual 3 22 _3 MEMO...
Page 98: ...AX 3 Series Operation Manual 4 44 _4 MEMO...
Page 118: ...AX 3 Series Operation Manual 6 8 _6 MEMO...
Page 310: ...AX 3 Series Operation Manual 8 18 8_ MEMO...
Page 355: ...Appendix A Troubleshooting A 5 _A...