<?xml version="1.0" encoding="utf-8"?>
<TcPlcObject Version="1.1.0.1" ProductVersion="3.1.4024.12">
  <POU Name="FB_AxisBase" Id="{4e19caa6-e49e-4d8a-ad80-a51ffea1b8bc}" SpecialFunc="None">
    <Declaration><![CDATA[FUNCTION_BLOCK FB_AxisBase
VAR_INPUT

END_VAR
VAR_OUTPUT
	AlwayFalse			:	BOOL := FALSE;
	AlwayTrue			:	BOOL := TRUE;
END_VAR

VAR
	refAxis				: 	AXIS_REF;
	CamInStartMode		:	mc_startmode;
END_VAR
]]></Declaration>
    <Implementation>
      <ST><![CDATA[
]]></ST>
    </Implementation>
    <Method Name="M_CamIn" Id="{d0dee52f-3c8b-404b-93d8-9a058b27f9ba}">
      <Declaration><![CDATA[METHOD M_CamIn : BOOL
VAR_INPUT
	bExecute			:	BOOL;
	nMasterAxisId		:	UINT;
	nCamTableID			:	UDINT;
END_VAR
VAR_INST
	fbCamIn				:	MC_CamIn;
END_VAR
]]></Declaration>
      <Implementation>
        <ST><![CDATA[IF NOT AxisIsInVaild(nMasterAxisId) THEN 
	RETURN;
END_IF
fbCamIn(
	Master:= arAxis[nMasterAxisId].refAxis, 
	Slave:= refAxis, 
	Execute:= bExecute, 
	MasterOffset:= , 
	SlaveOffset:= , 
	MasterScaling:= , 
	SlaveScaling:= , 
	StartMode:= CamInStartMode, 
	CamTableID:= nCamTableID, 
	BufferMode:= , 
	Options:= , 
	InSync=> , 
	Busy=> , 
	Active=> , 
	CommandAborted=> , 
	Error=> , 
	ErrorID=> );
M_CamIn := fbCamIn.InSync;]]></ST>
      </Implementation>
    </Method>
    <Method Name="M_CamOut" Id="{265ff212-c276-4692-8ed9-27f689907f59}">
      <Declaration><![CDATA[METHOD M_CamOut : BOOL
VAR_INPUT
	bExecute			:	BOOL;
END_VAR
VAR_INST
	fbCamOut			:	MC_CamOut;
END_VAR
]]></Declaration>
      <Implementation>
        <ST><![CDATA[fbCamOut(
	Slave:= refAxis, 
	Execute:= bExecute, 
	Options:= , 
	Done=> , 
	Busy=> , 
	Error=> , 
	ErrorID=> );
M_CamOut := fbCamOut.Done;]]></ST>
      </Implementation>
    </Method>
    <Method Name="M_GearIn" Id="{c75d4e14-772f-445d-b87d-52d69222261c}">
      <Declaration><![CDATA[METHOD M_GearIn : BOOL
VAR_INPUT
	bExecute			:	BOOL;
	fRatio				:	LREAL;
	nMasterAxisId		:	UINT;
END_VAR
VAR_INST
	fbGearIn			:	MC_GearIn;
END_VAR
]]></Declaration>
      <Implementation>
        <ST><![CDATA[IF NOT AxisIsInVaild(nMasterAxisId) THEN 
	RETURN;
END_IF

fbGearIn(
	Master:= arAxis[nMasterAxisId].refAxis, 
	Slave:= refAxis, 
	Execute:= bExecute, 
	RatioNumerator:= fRatio, 
	RatioDenominator:= 1, 
	Acceleration:= , 
	Deceleration:= , 
	Jerk:= , 
	BufferMode:= , 
	Options:= , 
	InGear=> , 
	Busy=> , 
	Active=> , 
	CommandAborted=> , 
	Error=> , 
	ErrorID=> );
	
M_GearIn := fbGearIn.InGear;
]]></ST>
      </Implementation>
    </Method>
    <Method Name="M_GearOut" Id="{1c0f3847-8fe9-481c-afc8-df17cfc19ce6}">
      <Declaration><![CDATA[METHOD M_GearOut : BOOL
VAR_INPUT
	bExecute			:	BOOL;
END_VAR
VAR_INST
	fbGearOut			:	MC_GearOut;
END_VAR
]]></Declaration>
      <Implementation>
        <ST><![CDATA[fbGearOut(
	Slave:= refAxis, 
	Execute:= bExecute, 
	Options:= , 
	Done=> , 
	Busy=> , 
	Error=> , 
	ErrorID=> );
	
M_GearOut := fbGearOut.Done;	]]></ST>
      </Implementation>
    </Method>
    <Method Name="M_JogBackwards" Id="{ec4304a1-a862-4953-a0ec-89e6937b514c}">
      <Declaration><![CDATA[METHOD M_JogBackwards : BOOL
VAR_INPUT
	bExecute		:	BOOL;
END_VAR
VAR_INST
	fbJog				:	MC_Jog;
	
END_VAR]]></Declaration>
      <Implementation>
        <ST><![CDATA[fbJog(
	Axis:= refAxis, 
	JogForward:= FALSE, 
	JogBackwards:= bExecute, 
	Mode:= , 
	Position:= , 
	Velocity:= , 
	Acceleration:= , 
	Deceleration:= , 
	Jerk:= , 
	Done=> , 
	Busy=> , 
	Active=> , 
	CommandAborted=> , 
	Error=> , 
	ErrorID=> );]]></ST>
      </Implementation>
    </Method>
    <Method Name="M_JogForward" Id="{3051b2b1-0253-4924-b7c4-3baf3834904a}">
      <Declaration><![CDATA[METHOD M_JogForward : BOOL
VAR_INPUT
	bExecute		:	BOOL;
	
END_VAR
VAR_INST
	fbJog				:	MC_Jog;
	
END_VAR]]></Declaration>
      <Implementation>
        <ST><![CDATA[fbJog(
	Axis:= refAxis, 
	JogForward:= bExecute, 
	JogBackwards:= FALSE, 
	Mode:= , 
	Position:= , 
	Velocity:= , 
	Acceleration:= , 
	Deceleration:= , 
	Jerk:= , 
	Done=> , 
	Busy=> , 
	Active=> , 
	CommandAborted=> , 
	Error=> , 
	ErrorID=> );]]></ST>
      </Implementation>
    </Method>
    <Method Name="M_MovAbs" Id="{cb6db04f-7fb0-4f83-a89e-bfa4864f6e77}">
      <Declaration><![CDATA[METHOD M_MovAbs : BOOL
VAR_INPUT
	bExecute			:	BOOL;
	fPosition			:	LREAL;
	fVelocity			:	LREAL;
END_VAR
VAR_INST
	fbMovAbs			:	MC_MoveAbsolute;
END_VAR
]]></Declaration>
      <Implementation>
        <ST><![CDATA[fbMovAbs(
	Axis:= refAxis, 
	Execute:= bExecute, 
	Position:= fPosition, 
	Velocity:= fVelocity, 
	Acceleration:= , 
	Deceleration:= , 
	Jerk:= , 
	BufferMode:= , 
	Options:= , 
	Done=> , 
	Busy=> , 
	Active=> , 
	CommandAborted=> , 
	Error=> , 
	ErrorID=> );
	
M_MovAbs := fbMovAbs.Done;]]></ST>
      </Implementation>
    </Method>
    <Method Name="M_MovRel" Id="{e1565fd5-4f95-42b8-bcae-68232fbf5415}">
      <Declaration><![CDATA[METHOD M_MovRel : BOOL
VAR_INPUT
	bExecute			:	BOOL;
	fPosition			:	LREAL;
	fVelocity			:	LREAL;
END_VAR
VAR_INST
	fbMovRel		:	MC_MoveRelative;
END_VAR]]></Declaration>
      <Implementation>
        <ST><![CDATA[fbMovRel(
	Axis:= refAxis, 
	Execute:= bExecute, 
	Distance:= fPosition, 
	Velocity:= fVelocity, 
	Acceleration:= , 
	Deceleration:= , 
	Jerk:= , 
	BufferMode:= , 
	Options:= , 
	Done=> , 
	Busy=> , 
	Active=> , 
	CommandAborted=> , 
	Error=> , 
	ErrorID=> );
M_MovRel := fbMovRel.Done;]]></ST>
      </Implementation>
    </Method>
    <Method Name="M_Power" Id="{4cd7dc85-2306-46df-8084-5f8151dff687}">
      <Declaration><![CDATA[METHOD M_Power : BOOL
VAR_INPUT
	bExecute			:	BOOL;
	bEnable_Positive	:	BOOL;
	bEnable_Negative	:	BOOL;
	fOverride			:	LREAL;
END_VAR
VAR_INST
	fbPower				:	MC_Power;
END_VAR
]]></Declaration>
      <Implementation>
        <ST><![CDATA[
fbPower(
	Axis:= refAxis, 
	Enable:= bExecute, 
	Enable_Positive:= bEnable_Positive, 
	Enable_Negative:= bEnable_Negative, 
	Override:= fOverride, 
	BufferMode:= , 
	Options:= , 
	Status=> , 
	Busy=> , 
	Active=> , 
	Error=> , 
	ErrorID=> );
M_Power := fbPower.Status;]]></ST>
      </Implementation>
    </Method>
    <Method Name="M_ReadStatus" Id="{df88ce7b-761f-4ab8-8220-4b437d5b6a55}">
      <Declaration><![CDATA[METHOD M_ReadStatus : BOOL
VAR_INPUT
END_VAR
]]></Declaration>
      <Implementation>
        <ST><![CDATA[refAxis.ReadStatus();]]></ST>
      </Implementation>
    </Method>
    <Method Name="M_Reset" Id="{bbba1206-e194-4d08-ba4b-a6482c34a31e}">
      <Declaration><![CDATA[METHOD M_Reset : BOOL
VAR_INPUT
	bExecute			:	BOOL;
END_VAR
VAR_INST
	fbNcReset			:	MC_Reset;
END_VAR]]></Declaration>
      <Implementation>
        <ST><![CDATA[fbNcReset(
	Axis:= refAxis, 
	Execute:= bExecute, 
	Done=> , 
	Busy=> , 
	Error=> , 
	ErrorID=> );
M_Reset := fbNcReset.Done;]]></ST>
      </Implementation>
    </Method>
    <Method Name="M_SetPosition" Id="{f372237f-080d-4564-ba6f-93ccd51f838e}">
      <Declaration><![CDATA[METHOD M_SetPosition : BOOL
VAR_INPUT
	bExecute			:	BOOL;
	fPosition			:	LREAL;
END_VAR
VAR_INST
	fbSetPosition		:	MC_SetPosition;
END_VAR]]></Declaration>
      <Implementation>
        <ST><![CDATA[fbSetPosition(
	Axis:= refAxis, 
	Execute:= bExecute, 
	Position:= fPosition, 
	Mode:= , 
	Options:= , 
	Done=> , 
	Busy=> , 
	Error=> , 
	ErrorID=> );
M_SetPosition := fbSetPosition.Done;]]></ST>
      </Implementation>
    </Method>
    <Method Name="M_Stop" Id="{ce14925a-0c69-44e2-b1e2-9ff468f83bae}">
      <Declaration><![CDATA[METHOD M_Stop : BOOL
VAR_INPUT
	bExecute			:	BOOL;
END_VAR
VAR_INST
	fbStop				:	MC_Stop;
END_VAR]]></Declaration>
      <Implementation>
        <ST><![CDATA[fbStop(
	Axis:= refAxis, 
	Execute:= bExecute, 
	Deceleration:= , 
	Jerk:= , 
	Options:= , 
	Done=> , 
	Busy=> , 
	Active=> , 
	CommandAborted=> , 
	Error=> , 
	ErrorID=> );
M_Stop := fbStop.Done;
]]></ST>
      </Implementation>
    </Method>
    <Property Name="P_StartMode" Id="{08856693-d637-48a5-b377-02ddb0b7cba3}">
      <Declaration><![CDATA[PROPERTY P_StartMode : mc_startmode]]></Declaration>
      <Get Name="Get" Id="{e0157c1c-45a2-4c46-ba5e-56fffa36f996}">
        <Declaration><![CDATA[VAR
END_VAR
]]></Declaration>
        <Implementation>
          <ST><![CDATA[P_StartMode := CamInStartMode;]]></ST>
        </Implementation>
      </Get>
      <Set Name="Set" Id="{b22c2400-ccb8-4dad-a5c0-4e797f52f7f6}">
        <Declaration><![CDATA[VAR
END_VAR
]]></Declaration>
        <Implementation>
          <ST><![CDATA[CamInStartMode := P_StartMode;]]></ST>
        </Implementation>
      </Set>
    </Property>
    <LineIds Name="FB_AxisBase">
      <LineId Id="9" Count="0" />
      <LineId Id="22" Count="0" />
    </LineIds>
    <LineIds Name="FB_AxisBase.M_CamIn">
      <LineId Id="43" Count="1" />
      <LineId Id="28" Count="0" />
      <LineId Id="11" Count="16" />
      <LineId Id="5" Count="0" />
      <LineId Id="32" Count="0" />
    </LineIds>
    <LineIds Name="FB_AxisBase.M_CamOut">
      <LineId Id="14" Count="6" />
      <LineId Id="5" Count="0" />
      <LineId Id="21" Count="0" />
    </LineIds>
    <LineIds Name="FB_AxisBase.M_GearIn">
      <LineId Id="49" Count="2" />
      <LineId Id="12" Count="0" />
      <LineId Id="16" Count="15" />
      <LineId Id="11" Count="0" />
      <LineId Id="35" Count="0" />
      <LineId Id="33" Count="1" />
    </LineIds>
    <LineIds Name="FB_AxisBase.M_GearOut">
      <LineId Id="12" Count="6" />
      <LineId Id="8" Count="0" />
      <LineId Id="20" Count="1" />
    </LineIds>
    <LineIds Name="FB_AxisBase.M_JogBackwards">
      <LineId Id="7" Count="14" />
      <LineId Id="5" Count="0" />
    </LineIds>
    <LineIds Name="FB_AxisBase.M_JogForward">
      <LineId Id="11" Count="14" />
      <LineId Id="5" Count="0" />
    </LineIds>
    <LineIds Name="FB_AxisBase.M_MovAbs">
      <LineId Id="13" Count="0" />
      <LineId Id="28" Count="2" />
      <LineId Id="17" Count="10" />
      <LineId Id="5" Count="0" />
      <LineId Id="31" Count="1" />
    </LineIds>
    <LineIds Name="FB_AxisBase.M_MovRel">
      <LineId Id="11" Count="14" />
      <LineId Id="5" Count="0" />
      <LineId Id="26" Count="0" />
    </LineIds>
    <LineIds Name="FB_AxisBase.M_Power">
      <LineId Id="5" Count="0" />
      <LineId Id="12" Count="11" />
      <LineId Id="10" Count="0" />
      <LineId Id="25" Count="0" />
    </LineIds>
    <LineIds Name="FB_AxisBase.M_ReadStatus">
      <LineId Id="5" Count="0" />
    </LineIds>
    <LineIds Name="FB_AxisBase.M_Reset">
      <LineId Id="9" Count="5" />
      <LineId Id="5" Count="0" />
      <LineId Id="17" Count="0" />
    </LineIds>
    <LineIds Name="FB_AxisBase.M_SetPosition">
      <LineId Id="10" Count="8" />
      <LineId Id="5" Count="0" />
      <LineId Id="19" Count="0" />
    </LineIds>
    <LineIds Name="FB_AxisBase.M_Stop">
      <LineId Id="10" Count="10" />
      <LineId Id="5" Count="0" />
      <LineId Id="21" Count="1" />
    </LineIds>
    <LineIds Name="FB_AxisBase.P_StartMode.Get">
      <LineId Id="2" Count="0" />
    </LineIds>
    <LineIds Name="FB_AxisBase.P_StartMode.Set">
      <LineId Id="2" Count="0" />
    </LineIds>
  </POU>
</TcPlcObject>