13 l_tbresetbitofdword, Function library lenzeplctoolbox.lib, Functions/function blocks – Lenze DDS Function library PLCToolBox User Manual
Page 21
Function library LenzePLCToolBox.lib
Functions/function blocks
2.13
L_TBResetBitOfDword
2−13
L
LenzePLCToolBox.lib EN 1.5
2.13
L_TBResetBitOfDword
DWORD L_TBResetBitOfDword (dwInput, byBitNr)
This function resets a single bit in a value of type "double word" to 0".
L_TBResetBitOfDword
0
31
dwInput
byBitNr
0
0...31
Reset
Transfer parameters
Identifiers
Data type
Info/possible settings
dwInput
Double word
Value in which a bit is to be reset to 0".
byBitNr
Byte
No. (0 ... 31) of the bit to be reset.
Return value: Double word
Value
Meaning
0 ... 4294967295
Value of type "double word" resulting from the reset bit.
Example
Calling the function in ST:
dwValue := 105 (* dwValue = 105 dec = 01101001 bin *)
dwValue := L_TBResetBitOfDword(dwValue, 3); (* reset bit 3 *)
(* dwValue = 97 dec = 01100001 bin *)