<?xml version="1.0" encoding="utf-8"?>
<TcPlcObject Version="1.1.0.1" ProductVersion="3.1.4024.12">
  <POU Name="FB_AxisPtp" Id="{c6cf4f29-010c-4723-82dd-ca47cd102688}" SpecialFunc="None">
    <Declaration><![CDATA[FUNCTION_BLOCK FB_AxisPtp EXTENDS FB_AxisBase
VAR_INPUT
	Com								:	FB_Command;
END_VAR                 		
VAR_INPUT PERSISTENT    		
	Cfg								:	FB_Configure;
END_VAR
VAR_OUTPUT
	STO_Activate			AT%Q*	:	BOOL := TRUE;
END_VAR
VAR
	
END_VAR
]]></Declaration>
    <Implementation>
      <ST><![CDATA[

M_Cyclic();]]></ST>
    </Implementation>
    <Method Name="M_Cyclic" Id="{c12b4a2c-3477-4d2c-a694-45f281cb53a3}">
      <Declaration><![CDATA[METHOD M_Cyclic : BOOL
VAR_INPUT
END_VAR
]]></Declaration>
      <Implementation>
        <ST><![CDATA[refAxis.ReadStatus();

M_Power(Com.bEnable,Com.bEnPos,Com.bEnNeg,COM.fOverride);

M_JogForward(Com.bJogFwd);

M_JogBackwards(Com.bJogBwd);

M_Reset(Com.bReset);

M_Stop(Com.bStop);

IF Com.nPtpMode = 1 THEN // 配合 hmi 使用
	M_MovRel(Com.bRun,Com.fPosition,Com.fVelocity);
ELSIF Com.nPtpMode = 2 THEN 
	M_MovAbs(com.bRun,com.fPosition,com.fVelocity);	
END_IF

M_GearIn(com.bGearIn,com.fRatio,com.nMasterAxisId);

M_GearOut(com.bGearOut);

// 备用
M_CamIn(com.bCamIn,com.nMasterAxisId,com.nCamTableID);



]]></ST>
      </Implementation>
    </Method>
    <LineIds Name="FB_AxisPtp">
      <LineId Id="14" Count="1" />
      <LineId Id="9" Count="0" />
    </LineIds>
    <LineIds Name="FB_AxisPtp.M_Cyclic">
      <LineId Id="35" Count="0" />
      <LineId Id="72" Count="0" />
      <LineId Id="5" Count="0" />
      <LineId Id="7" Count="0" />
      <LineId Id="6" Count="0" />
      <LineId Id="9" Count="0" />
      <LineId Id="8" Count="0" />
      <LineId Id="11" Count="0" />
      <LineId Id="10" Count="0" />
      <LineId Id="21" Count="0" />
      <LineId Id="20" Count="0" />
      <LineId Id="37" Count="0" />
      <LineId Id="22" Count="0" />
      <LineId Id="41" Count="0" />
      <LineId Id="38" Count="0" />
      <LineId Id="40" Count="0" />
      <LineId Id="39" Count="0" />
      <LineId Id="26" Count="0" />
      <LineId Id="25" Count="0" />
      <LineId Id="14" Count="1" />
      <LineId Id="28" Count="0" />
      <LineId Id="27" Count="0" />
      <LineId Id="29" Count="0" />
      <LineId Id="31" Count="0" />
      <LineId Id="30" Count="0" />
      <LineId Id="16" Count="0" />
      <LineId Id="12" Count="0" />
    </LineIds>
  </POU>
</TcPlcObject>