12 l_tbresetbitofbyte, Function library lenzeplctoolbox.lib, Functions/function blocks – Lenze DDS Function library PLCToolBox User Manual
Page 20
Advertising
![background image](/manuals/566055/20/background.png)
Function library LenzePLCToolBox.lib
Functions/function blocks
2.12
L_TBResetBitOfByte
2−12
L
LenzePLCToolBox.lib EN 1.5
2.12
L_TBResetBitOfByte
BYTE L_TBResetBitOfByte (byInput, byBitNr)
This function resets a single bit in a value of type "byte" to 0".
L_TBResetBitOfByte
0
7
byInput
byBitNr
0
0...7
Reset
Transfer parameters
Identifiers
Data type
Info/possible settings
byInput
Byte
Value in which a bit is to be reset to 0".
byBitNr
Byte
No. (0 ... 7) of the bit to be reset.
Return value: Byte
Value
Meaning
0 ... 255
Value of type "byte" resulting from the reset bit.
Example
Calling the function in ST:
byValue := 105 (* byValue = 105 dec = 01101001 bin *)
byValue := L_TBResetBitOfByte(byValue, 3); (* reset bit 3 *)
(* byValue = 97 dec = 01100001 bin *)
Advertising