Lenze DDS Function library PLCToolBox Uživatelský manuál Strana 25

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 26
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 24
Function library LenzePLCToolBox.lib
Functions/function blocks
2.17 L_TBSetBitOfWord
2−17
L LenzePLCToolBox.lib EN 1.5
2.17 L_TBSetBitOfWord
WORD L_TBSetBitOfWord (wInput, byBitNr)
This function sets a single bit in a value of type "word" to "1".
L_TBSetBitOfWord
0
15
wInput
byBitNr
1
0...15
Set
Transfer parameters
Identifiers Data type Info/possible settings
wInput Word Value in which a bit is to be set to 1".
byBitNr Byte No. (0 ... 15) of the bit to be set.
Return value: Word
Value Meaning
0 ... 65535 Value of type "word" resulting from the set bit.
Example
Calling the function in ST:
wValue := 97 (* wValue = 97 dec = 01100001 bin *)
wValue := L_TBSetBitOfWord(wValue, 3); (* set bit 3 *)
(* wValue = 105 dec = 01101001 bin *)
Zobrazit stránku 24
1 2 ... 20 21 22 23 24 25 26

Komentáře k této Příručce

Žádné komentáře