JUMO LOGOSCREEN 601 Manual page 36

Paperless recorder, st editor
Hide thumbs Also See for LOGOSCREEN 601:
Table of Contents

Advertisement

8 Functions
DINT_TO_INT
Converts a DOUBLE INTEGER into an INTEGER.
Only the lower two bytes are evaluated (bit 0 to bit 15).
Examples:
a := DINT_TO_INT(1); (* a = 1; 1 = 0000 0000 0000 0001 = 0x0001 *)
b := DINT_TO_INT(65535); (* b = 65535; 65535 = 1111 1111 1111 1111 = 0xFFFF *)
c := DINT_TO_INT(65536); (* c = 0; 65536 = 0001 0000 0000 0000 0000 = 0x10000 *)
d := DINT_TO_INT(65537); (* d = 1, 65537 = 0001 0000 0000 0000 0001 =0x10001 *)
DINT_TO_BOOL
Converts a DOUBLE INTEGER into a BOOL value.
The result is FALSE if the argument is 0. In all other cases, the result is TRUE.
Examples:
a := DINT_TO_BOOL(0); (* a = FALSE: *)
b := DINT_TO_BOOL(1); (* b = TRUE *)
c := DINT_TO_BOOL(100000); (* c = TRUE *)
REAL_TO_INT
Converts a REAL number with rounding into an INTEGER.
Examples:
a := REAL_TO_INT(1.378); (* a = 1 *)
b := REAL_TO_INT(1.897); (* b = 2 *)
REAL_TO_DINT
Converts a REAL number with rounding into a DOUBLE INTEGER.
Examples:
a := REAL_TO_DINT(100000.378); (* a = 100000 *)
b := REAL_TO_DINT(100000.897); (* b = 100001 *)
36

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Logoscreen 700706521706530

Table of Contents