<?xml version="1.0" encoding="UTF-8"?>

<UserFunctionMgr>
   <UserFunction
       Expression="(*&#10;Returns the value of the specified bit in the variable&#13;&#10;*)&#10;&#10;FUNCTION BitTest : BOOL&#10;&#9;VAR_INPUT&#10;&#9;&#9;Variable : DWORD;&#10;&#9;&#9;BitNumber : DINT;&#13;&#10;&#9;END_VAR&#13;&#10;&#9;VAR&#13;&#10;&#9;&#9;InitNum : DWORD := 16#1;&#13;&#10;&#9;END_VAR&#10;&#10;&#9;BitTest := sel( (Variable AND SHL(16#1,BitNumber)) &lt;&gt; 0, TRUE, False);&#10;&#10;END_FUNCTION"/>
</UserFunctionMgr>
