Real / lreal, String, Time data types – Lenze PLC Designer PLC Designer (R2-x) User Manual

Page 519: L-force | plc designer

Advertising
background image

L-force | PLC Designer

Data types in PLC Designer



DMS 3.2 EN 02/2011 TD29

517

11.1.4

REAL / LREAL

REAL and LREAL are so-called floating-point types. They are required to represent
rational numbers. 32 bits of memory space is reserved for REAL and 64 bits for LREAL.

Valid values for REAL: 1.175494351e-38 to 3.402823466e+38

Valid values for LREAL: 2.2250738585072014e-308 to 1.7976931348623158e+308

see also F: REAL-/LREAL constants

11.1.5

STRING

A STRING type variable can contain any string of characters. The size entry in the
declaration determines how much memory space should be reserved for the variable.
It refers to the number of characters in the string and can be placed in parentheses or
square brackets. If no size specification is given, the default size of 80 characters will
be used.

The string lenght basically is not limited in »PLC Designer«, but string functions only
can process strings of 1 - 255 characters !

Example of a String Declaration with 35 characters:

str:STRING(35):='This is a String';

see also chapter Operands in CoDeSys, STRING constants

11.1.6

Time Data Types

The data types TIME, TIME_OF_DAY (abb. TOD), DATE and DATE_AND_TIME (abb. DT)
are handled internally like DWORD.

Time is given in milliseconds in TIME and TOD, time in TOD begins at 12:00 A.M.

Time is given in seconds in DATE and DT beginning with January 1, 1970 at 12:00 A.M.

See in the following the time data formats used to assign values for time constants:

Advertising