<?xml version="1.0" encoding="utf-8"?>
<TcPlcObject Version="1.1.0.1" ProductVersion="3.1.4022.10">
  <POU Name="PRG_ManualMode" Id="{e391daab-6f73-40fb-bab4-4c6a5963aeb1}" SpecialFunc="None">
    <Declaration><![CDATA[PROGRAM PRG_ManualMode
VAR_INPUT
	stManualMode : ST_ManualMode;
END_VAR

VAR
	fbMC_Jog : MC_Jog;
END_VAR
]]></Declaration>
    <Implementation>
      <ST><![CDATA[IF stManualMode.nManualTyp = 2 THEN
	fbMC_Jog.Mode:= MC_JOGMODE_CONTINOUS;
END_IF

IF stManualMode.nManualTyp = 3 THEN
	fbMC_Jog.Mode:= MC_JOGMODE_INCHING;
	fbMC_Jog.Position := stManualMode.nInc/1000.0;
END_IF


IF stManualMode.nLogAxisNumber = 0 THEN
	RETURN;
END_IF

fbMC_Jog(
	Axis:= arrAxis_Ref[stManualMode.nLogAxisNumber],
	JogForward:= stManualMode.bKeyPos AND bAllCoupled, 
	JogBackwards:= stManualMode.bKeyNeg AND bAllCoupled,   
	Velocity:= stManualMode.nSpeed/60.0);]]></ST>
    </Implementation>
    <LineIds Name="PRG_ManualMode">
      <LineId Id="3" Count="17" />
      <LineId Id="2" Count="0" />
    </LineIds>
  </POU>
</TcPlcObject>