Lenze DDS Function library PLCToolBox Manuale Utente Pagina 25

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 26
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 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 *)
Vedere la pagina 24
1 2 ... 20 21 22 23 24 25 26

Commenti su questo manuale

Nessun commento