Fields - JUMO LOGOSCREEN 601 Manual

Paperless recorder, st editor
Hide thumbs Also See for LOGOSCREEN 601:
Table of Contents

Advertisement

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;
5 Data types and fields
27

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Logoscreen 700706521706530

Table of Contents