Lenze PLC Designer PLC Designer (R2-x) Manuel d'utilisateur Page 492

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 844
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 491
L-force | PLC Designer
IEC Operators and additional norm extending functions
490 DMS 3.2 EN 02/2011 TD29
9.9.5 REAL_TO-/ LREAL_TO Conversions
Converting from the variable type REAL or LREAL to a different type:
The value will be rounded up or down to the nearest whole number and converted
into the new variable type. Exceptions to this are the variable types STRING, BOOL,
REAL and LREAL.
Please regard at a conversion to type STRING that the total number of digits is limited
to 16. If the (L)REAL-number has more digits, then the sixteenth will be rounded. If the
length of the STRING is defined to short, it will be cut beginning from the right end.
When you perform a type conversion from a larger to a smaller type, you risk losing
some information.
Example in ST:
i := REAL_TO_INT(1.5); (* Result is 2 *)
j := REAL_TO_INT(1.4); (* Result is 1 *)
i := REAL_TO_INT(-1.5); (* Result is -2 *)
j := REAL_TO_INT(-1.4); (* Result is -1 *)
Example in IL:
LD 2.7
REAL_TO_INT
GE %MW8
Example in FBD:
Vue de la page 491
1 2 ... 487 488 489 490 491 492 493 494 495 496 497 ... 843 844

Commentaires sur ces manuels

Pas de commentaire