Prefix constants (Typed Literals)

Which products are affected?

ESP-DDS2-P (DDS Professional 2.0)
ESP-DDS2-PU1 (DDS Professional 2.0 Upgrade)

Function description

When using constants the smallest data type possible is used generally. The constant can be provided with a prefix type in order to change its data type. DINT#1 corresponds to the constant value 1 with a data type size of 4 bytes (Double Integer).

Applications

The prefix type is used e.g. in case of feedbacks in the CFC editor as shown in the picture below.
  • In the first drawing the integer variable nValue counts from –128 to 127. The ADD operator calculates within the value range of its inputs. In this case it is constant 1 with a data type size of 1 byte.
  • In the second example constant 1 is declared as integer through the prefix type. As a result, the ADD operator calculates within the integer value range. Therefore, variable nValue1 assumes values between –32768 and 32767.


URL for linking this AKB article: https://www.lenze.com/en-de/go/akb/20034768/1/
Kontaktformular