ResetBit
- Last UpdatedAug 07, 2026
- 1 minute read
Reset resets a single bit in an Integer tag to 0.
|
Group |
Sync / Async Exec |
String Exp? |
Windows Support |
Windows Embedded Support |
IoT View Support |
Thin Client Support |
Mobile Access Support |
|
Arithmetic |
Sync |
No |
Yes |
Yes |
Yes |
Yes |
Yes |
Syntax
ResetBit(tagName, numBitNumber)
tagName
The name of the project tag.
Note: If this parameter is enclosed in quotes, the string literal will be used. Otherwise, the value of the tag/expression will be used.
numBitNumber
The number or position (a number from 0 to 31) of the bit.
Return value
This function returns one of the following values:
|
Value |
Description |
|
0 |
No error |
|
1 |
Invalid parameter |
|
2 |
Tag does not exist |
Notes
You can also reference the Bit property of a project tag in order to get/set a specific bit in the value of that tag. For more information, see Reference a tag property instead of a project tag.
Examples
As used in a Math worksheet:
|
Tag Name |
Expression |
|---|---|
|
Tag |
ResetBit("numSource", 4) // If the tag numSource held a value of 16, then the function returns 0 and numSource holds a new value of 0. |
|
Tag |
ResetBit("numSource", 1) // If the tag numSource held the value 19, then the function returns 0 and numSource holds a new value of 17. |