<TcPlcObject Version="1.1.0.1" ProductVersion="3.1.0.20">
  <POU Name="PRG_GetFastMFunctions" Id="{6a177d19-ad8d-4145-af3c-6fdc50359d7e}">
    <Declaration><![CDATA[PROGRAM PRG_GetFastMFunctions
VAR_INPUT
	nChan: 	UINT;
END_VAR
VAR
	i: 		UINT;
	l: 		SINT;
	bBit: 	BOOL;
	index: 	UINT;
END_VAR
]]></Declaration>
    <Implementation>
      <ST><![CDATA[(* ==========================================================*)
(*   PRG: P_GetFastMfunctions		        		            	 *)
(* ----------------------------------------------------------*)
(*   Desc: fill the global defined M-functions Array with    *)
(*			  fast M-Functions from NCI Channel                 *)
(*   Auth: MiB                                               *)
(*   Date: 02.09.2005                                        *)
(*   Rev.: 1.0                                               *)
(* ==========================================================*)



IF (nChan<2) THEN   (* NCI channel starts at 2 *)
	RETURN;
END_IF;

FOR i:=0 TO 4 DO  (* check all 5 dwords *)
	FOR l := 0 TO 31 DO
		bBit := GETBIT32(arrNCToPLC_NCIChannel_REF[nChan-1].FastMFuncMask[i+1], l);
      index := (i*32) + l;
		IF ( bBit ) THEN
			bfastMFunc[nChan-1,index] := TRUE;
		ELSE
			bfastMFunc[nChan-1,index] := FALSE;
		END_IF
	END_FOR
END_FOR]]></ST>
    </Implementation>
    <ObjectProperties />
  </POU>
</TcPlcObject>