Structures, L-force | plc designer – Lenze PLC Designer PLC Designer (R2-x) User Manual

Page 528

Advertising
background image

L-force | PLC Designer

Data types in PLC Designer

526

DMS 3.2 EN 02/2011 TD29



11.2.5

Structures

Structures are created as objects in the Object Organizer under the register card

Data types. They begin with the keywords TYPE and STRUCT and end with

END_STRUCT and END_TYPE.

The syntax for structure declarations is as follows:

TYPE

<Structurename>:

STRUCT

<Declaration of Variables 1>

.

.

<Declaration of Variables n>

END_STRUCT

END_TYPE

<Structurename> is a type that is recognized throughout the project and can be used
like a standard data type.

Interlocking structures are allowed. The only restriction is that variables may not be
placed at addresses (the AT declaration is not allowed!).

Example for a structure definition named Polygonline:

TYPE Polygonline:

STRUCT

Start:ARRAY [1..2] OF INT;

Point1:ARRAY [1..2] OF INT;

Point2:ARRAY [1..2] OF INT;

Point3:ARRAY [1..2] OF INT;

Point4:ARRAY [1..2] OF INT;

End:ARRAY [1..2] OF INT;

END_STRUCT

END_TYPE

Advertising