Extensions to standard iec1131-3, Norm-extending data types, Union – Lenze PLC Designer PLC Designer (R3-1) User Manual

Page 1024: Any_type, Ltime, Extensions to standard iec1131-3 2, L-force | plc designer

Advertising
background image

L-force | PLC Designer

Programming Reference

1022

DMS 4.1 EN 03/2011 TD29

16.2.2

Extensions to Standard IEC1131-3

Norm-extending Data Types
In addition to the data types according to IEC1131-3 there are also some norm-
extending data types available implicitly in »PLC Designer«:
• UNION
• ANY_TYPE
• LTIME
• WSTRING
• References
• Pointers

union
As an extension to the IEC 61131-3 standard it is possible to declare unions in user-
defined types.
In a union all components have the same offset, that is they all occupy the same
storage location. Thus, assuming a union definition as shown in the following
example, an assignment to name.a also would manipulate name.b.
Example:

TYPE name: UNION
a : LREAL;
b : LINT;
END_UNION
END_TYPE

ANY_TYPE
not yet implemented: As an extension to the IEC 61131-3 standard it is possible to
declare inputs of functions or methods as to be of type ANY_TYPE.

LTIME
As extension to the IEC 61131-3 LTIME is supported as time base for high resolution
timers. LTIME is of size 64 Bit and resolution nanoseconds.
Syntax:
LTIME#<time declaration>
The time declaration can include the time units as used with the TIME constant and
additionally:
"us" : microseconds
"ns" : nanoseconds

Advertising