TB_FIRST_S_BIT_OF_DWORD

Representation in FBD

General Information

This function block extracts the furthest right 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_FSBit SINT Displays the bit no. of the set bit furthest to the right.
dw_Out DWORD Output DWord in which only the furthest right bit is set, all other bits are masked out.