Lenze DDS Function library PLCToolBox Manuel d'utilisateur Page 17

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 26
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 16
Function library LenzePLCToolBox.lib
Functions/function blocks
2.9 L_TBGetBitOfByte
2−9
L LenzePLCToolBox.lib EN 1.5
2.9 L_TBGetBitOfByte
BOOL L_TBGetBitOfByte (byInput, byBitNr)
This function returns the state of a single bit within a "byte" value.
L_TBGetBitOfByte
0
7
byInput
byBitNr
0...7
state?
FALSE/TRUE
Transfer parameters
Identifiers Data type Info/possible settings
byInput Byte Value
byBitNr Byte No. (0 ... 7) of the bit of byInput whose state is to be determined.
Return value: Bool
Value Meaning
FALSE/TRUE State of bit byBitNr of byInput.
Example
Calling the function in ST:
byValue := 105 (* byValue = 105 dec = 01101001 bin *)
bBit0 := L_TBGetBitOfByte(byValue, 0); (* bBit0 = TRUE *)
bBit1 := L_TBGetBitOfByte(byValue, 1); (* bBit1 = FALSE *)
bBit2 := L_TBGetBitOfByte(byValue, 2); (* bBit2 = FALSE *)
Vue de la page 16
1 2 ... 12 13 14 15 16 17 18 19 20 21 22 ... 25 26

Commentaires sur ces manuels

Pas de commentaire