How to assign the minimum or maximum value of a data type?
If you want to assign the minimum value (= the lower limit) or the maximum value (= the upper limit) of particular →data types, use the terms MIN
or MAX
. Bear in mind to prefix the term with the type (e.g. INT
) and the character #.
This possibility is provided as enhancement to the →IEC-standard and is supported for the following data types:
-
REAL
,LREAL
,USINT
,UINT
,UDINT
,ULINT
,SINT
,INT
,DINT
orLINT
(corresponds to →generic data typeANY_NUM
) -
BYTE
,WORD
,DWORD
orLWORD
(corresponds to →generic data typeANY_BIT
withoutBOOL
)
See "Supported data types (in ST)" about all lower/upper limits of the data types.
Example |
---|
|