Lenze DDS Function library PLCToolBox Instrukcja Użytkownika Strona 23

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 26
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 22
Function library LenzePLCToolBox.lib
Functions/function blocks
2.15 L_TBSetBitOfByte
2−15
L LenzePLCToolBox.lib EN 1.5
2.15 L_TBSetBitOfByte
BYTE L_TBSetBitOfByte (byInput, byBitNr)
This function sets a single bit in a value of type "byte" to "1".
L_TBSetBitOfByte
0
7
byInput
byBitNr
1
0...7
Set
Transfer parameters
Identifiers Data type Info/possible settings
byInput Byte Value in which a bit is to be set to 1".
byBitNr Byte No. (0 ... 7) of the bit to be set.
Return value: Byte
Value Meaning
0 ... 255 Value of type "byte" resulting from the set bit.
Example
Calling the function in ST:
byValue := 97 (* byValue = 97 dec = 01100001 bin *)
byValue := L_TBSetBitOfByte(byValue, 3); (* set bit 3 *)
(* byValue = 105 dec = 01101001 bin *)
Przeglądanie stron 22
1 2 ... 18 19 20 21 22 23 24 25 26

Komentarze do niniejszej Instrukcji

Brak uwag