<?xml version="1.0" encoding="utf-8"?>
<TcPlcObject Version="1.1.0.1" ProductVersion="3.1.4022.10">
  <POU Name="PRG_ErrorResetAllAxes" Id="{8e4f1082-aece-4f43-b510-385957819d35}" SpecialFunc="None">
    <Declaration><![CDATA[PROGRAM PRG_ErrorResetAllAxes
VAR_INPUT
	bExecute:				BOOL;
END_VAR
VAR_OUTPUT
	bDone: 					BOOL;
END_VAR
VAR
	i: UINT;
	MC_Reset1: 				ARRAY [1..nMaxNumberOfAxis] OF MC_Reset;
	MC_ReadAxisError1:	ARRAY [1..nMaxNumberOfAxis] OF MC_ReadAxisError;
END_VAR]]></Declaration>
    <Implementation>
      <ST><![CDATA[(* ==========================================================*)
(*   PRG: ErrorResetAllAxis		        		             *)
(* ----------------------------------------------------------*)
(*   Desc: 											         *)
(*   Auth: MiB / TV                                          *)
(*   Date: 02.09.2005                                        *)
(*   Last: 02.04.2013                                        *)
(*   Rev.: 1.1                                               *)
(* ==========================================================*)

FOR i:=1 TO 2 DO
	MC_ReadAxisError1[i](
		Enable:= TRUE ,
		Axis:= arrAxis_REF[i],
		Error=> ,
		ErrorID=> );
END_FOR


bDone := TRUE;
FOR i:=1 TO nMaxNumberOfAxis DO
   IF (MC_ReadAxisError1[i].Error) THEN 		(* only reset axis, when axis error is true *)
		MC_Reset1[i](
			Execute:= bExecute ,
			Axis:= arrAxis_REF[i],
			Done=> bDone,
			Error=> ,
			ErrorID=> );
		bDone := MC_Reset1[i].Done AND bDone;
	END_IF
END_FOR;

]]></ST>
    </Implementation>
    <LineIds Name="PRG_ErrorResetAllAxes">
      <LineId Id="3" Count="31" />
      <LineId Id="2" Count="0" />
    </LineIds>
  </POU>
</TcPlcObject>