LGF_BitTest (FC / V3.0.1)


Author: Siemens SIMATIC Systems Support

Short description

This block checks whether a bit is TRUE or FALSE at a given 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_BitTest (FC)
DWord  value Ret_Val  Bool
    
USInt  bitNo   
    
   

Input parameter

IdentifierData typeDescription
valueDWordTag where the bit has to be tested
bitNoUSIntbit number to test in "value" parameter

Output parameter

IdentifierData typeDescription
Ret_ValBoolValue of the checked bit.

Change log

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