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

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 26
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 16
Function library LenzePLCToolBox.lib
Functions/function blocks
2.9 L_TBGetBitOfByte
2−9
L LenzePLCToolBox.lib EN 1.5
2.9 L_TBGetBitOfByte
BOOL L_TBGetBitOfByte (byInput, byBitNr)
This function returns the state of a single bit within a "byte" value.
L_TBGetBitOfByte
0
7
byInput
byBitNr
0...7
state?
FALSE/TRUE
Transfer parameters
Identifiers Data type Info/possible settings
byInput Byte Value
byBitNr Byte No. (0 ... 7) of the bit of byInput whose state is to be determined.
Return value: Bool
Value Meaning
FALSE/TRUE State of bit byBitNr of byInput.
Example
Calling the function in ST:
byValue := 105 (* byValue = 105 dec = 01101001 bin *)
bBit0 := L_TBGetBitOfByte(byValue, 0); (* bBit0 = TRUE *)
bBit1 := L_TBGetBitOfByte(byValue, 1); (* bBit1 = FALSE *)
bBit2 := L_TBGetBitOfByte(byValue, 2); (* bBit2 = FALSE *)
Vista de página 16
1 2 ... 12 13 14 15 16 17 18 19 20 21 22 ... 25 26

Comentários a estes Manuais

Sem comentários