CLEARBIT32
The function resets the bit specified by a bit number in the 32 bit value that is passed to it to zero and returns the resulting value.
FUNCTION CLEARBIT32 : DWORD
Inputs
VAR_INPUT
inVal32 : DWORD;
bitNo : SINT;
END_VAR
Name | Type | Description |
---|---|---|
inVal32 | DWORD | 32-bit value to be changed. |
bitNo | SINT | Number of the bit that is to be set (0-31). This number is internally converted to a modulo 32 value prior to execution. |
Sample of calling the function in FBD:
Here bit 31 in the input value "C0000000" is reset. The result is the (hex) value "40000000".
Requirements
Development environment |
Target system type |
PLC libraries to include (Category group) |
---|---|---|
TwinCAT v3.1.0 |
PC or CX (x86, x64, ARM) |
Tc2_System (System) |