EasyManua.ls Logo

JUMO LOGOSCREEN 700 - 5.2 Fields

JUMO LOGOSCREEN 700
64 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
27
5 Data types and fields
5.2 Fields
All data types can also be declared as a one-dimensional or two-dimensional field (array) (see standard
DIN IEC 61131-3). The following sections use the data type REAL as an example.
One-dimensional field
Declaration of variables (example: field with 3 variables):
VAR
rArrayExample : ARRAY [0..2] OF REAL;
END_VAR
Declaration of constants (example: field with 3 constants):
VAR CONSTANT
rArrayConstExample : ARRAY [0..2] OF REAL := [0.0, 0.1, 0.2];
END_VAR
Assignment (example):
rArrayExample[0] := 0.0;
rArrayExample[1] := 0.1;
rArrayExample[2] := 0.2;
Two-dimensional field
Declaration of variables (example: field with 3 x 2 variables):
VAR
rArrayExample : ARRAY [0..2, 0..1] OF REAL;
END_VAR
Declaration of constants (example: field with 3 x 2 constants):
VAR CONSTANT
rArrayConstExample : ARRAY [0..2, 0..1] OF REAL :=
[0.0, 0.1, 0.2,
1.0, 1.1, 1.2];
END_VAR
Assignment (example):
rArrayExample[0,0] := 0.0;
rArrayExample[1,0] := 0.1;
rArrayExample[2,0] := 0.2;
rArrayExample[0,1] := 1.0;
rArrayExample[1,1] := 1.1;
rArrayExample[2,1] := 1.2;

Other manuals for JUMO LOGOSCREEN 700

Related product manuals