Lenze DDS Function library PLCToolBox Manual do Utilizador Página 25

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 26
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 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 *)
Vista de página 24
1 2 ... 20 21 22 23 24 25 26

Comentários a estes Manuais

Sem comentários