TB_LAST_S_BIT_OF_DWORD

Representation in FBD

General Information

This function block extracts the furthest left set bit from a DWord.

Recommended task: Cyclic / Event
Libraries used: BM_TYPES_40bd04 or higher

InOut Parameter

none

Input Parameter

Marking: Data type: Description:
dw_IN DWORD Input DWord

Output Parameter

Marking: Data type: Description:
si_LSBit SINT Displays the bit no. of the set bit furthest to the left.
dw_Out DWORD Output DWord in which only the furthest left bit is set, all other bits are masked out.