# LGF_BitSetTo (FC / V3.0.1)

Author: Siemens SIMATIC Systems Support

## Short description

This block sets a bit to TRUE or FALSE at a predefined position in a variable of the data type DWORD.
Alternatively, Word and Byte can be used instead of DWord by converting the passed parameter with, for example, BYTE_TO_DWORD and the result with DWORD_TO_BYTE.

### Block Interface

| LGF_BitSetTo (FC) |
--- | --- | ---
DWord |  |  | value |  | Ret_Val |  |  | DWord
USInt |  |  | bitNo |  |  |  |  |
Bool |  |  | setTo |  |  |  |  |

### Input parameter

Identifier | Data type | Description
--- | --- | ---
value | DWord | Tag where the bit has to be set / reset
bitNo | USInt | Bit number to set in "value" parameter
setTo | Bool | Set bit to FALSE / TRUE

### Output parameter

Identifier | Data type | Description
--- | --- | ---
Ret_Val | DWord | Tag with set bit

## Change log

Version & Date | Change description
--- | ---
| 01.00.00 | Siemens Industry Support
| 06.06.2015 | first release
| 03.00.00 | Siemens Industry Support
| 23.04.2020 | Set version to V3.0.0 harmonize the version of the whole library
| 03.00.01 | Simatic Systems Support
| 19.01.2021 | Insert documentation