Lenze DDS Function library PLCToolBox Instrukcja Użytkownika Strona 19

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 26
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 18
Function library LenzePLCToolBox.lib
Functions/function blocks
2.11 L_TBGetBitOfWord
2−11
L LenzePLCToolBox.lib EN 1.5
2.11 L_TBGetBitOfWord
BOOL L_TBGetBitOfWord (wInput, byBitNr)
This function returns the state of a single bit within a "word" value.
L_TBGetBitOfWord
0
15
wInput
byBitNr
0...15
state?
FALSE/TRUE
Transfer parameters
Identifiers Data type Info/possible settings
wInput Word Value
byBitNr Byte No. (0 ... 15) of the bit of wInput whose state is to be determined.
Return value: Bool
Value Meaning
FALSE/TRUE State of bit byBitNr of wInput.
Example
Calling the function in ST:
wValue := 105 (* wValue = 105 dec = 00000000 01101001 bin *)
bBit0 := L_TBGetBitOfWord(wValue, 0); (* bBit0 = TRUE *)
bBit1 := L_TBGetBitOfWord(wValue, 1); (* bBit1 = FALSE *)
bBit2 := L_TBGetBitOfWord(wValue, 2); (* bBit2 = FALSE *)
Przeglądanie stron 18
1 2 ... 14 15 16 17 18 19 20 21 22 23 24 25 26

Komentarze do niniejszej Instrukcji

Brak uwag