Lenze DDS Function library PLCToolBox Manual de usuario Pagina 17

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 26
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 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 pagina 16
1 2 ... 12 13 14 15 16 17 18 19 20 21 22 ... 25 26

Comentarios a estos manuales

Sin comentarios