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

  • 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 662
L-force | PLC Designer
PLC Designer Libraries
DMS 3.2 EN 02/2011 TD29 661
PACK
Provided by util.lib.
This function is capable of delivering back eight input bits B0, B1, ..., B7 from type
BOOL as a BYTE.
The function block UNPACK is closely related to this function.
PUTBIT
Provided by util.lib.
The input to this function consists of a DWORD X, a BYTE N and a BOOLean value B.
PUTBIT sets the N
th
bit from X on the value B, whereby it starts counting from the zero
bit.
Example in ST:
A:=38; (* binary 100110 *)
B:=PUTBIT(A,4,TRUE); (* Result : 54 = 2#110110 *)
C:=PUTBIT(A,1,FALSE); (* Result : 36 = 2#100100 *)
UNPACK
Provided by util.lib.
UNPACK converts the input B from type BYTE into 8 output variables B0,...,B7 of the
type BOOL, and this is the opposite to PACK.
Example in FBD: Output:
Vue de la page 662
1 2 ... 658 659 660 661 662 663 664 665 666 667 668 ... 843 844

Commentaires sur ces manuels

Pas de commentaire