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

Page 529

Advertising
background image

L-force | PLC Designer

Data types in PLC Designer



DMS 3.2 EN 02/2011 TD29

527

Example for the initialization of a structure:

Poly_1:polygonline := ( Start:=3,3, Point1 =5,2,
Point2:=7,3, Point3:=8,5, Point4:=5,7, End := 3,5);

Initializations with variables are not possible. See an example of the initialization of
an array of a structure under 'Arrays'.

Access on structure components:

You can gain access to structure components using the following syntax:

<Structure_Name>.<Componentname>

So for the above mentioned example of the structure 'polygonline' you can access the
component 'start' by

Poly_1.Start

.

11.2.6

References

You can use the user-defined reference data type to create an alternative name for a
variable, constant or function block.

Create your references as objects in the Object Organizer under the register card

Data types. They begin with the keyword TYPE and end with END_TYPE.

Syntax:

TYPE <Identifier>: <Assignment term>;
END_TYPE

Example:

TYPE message:STRING[50];

END_TYPE;

Advertising