<?xml version="1.0" encoding="utf-8"?>

<Project
    SWVersion="3.31.0"
    ProjectName="SynchOpenLoopBidir"
    Author="Ken Grant"
    ProjDesc=""
    SecurityVersion="1">
   <Controller
       Type="RMC150"
       Name="SynchOpenloop"
       CommunicationPath="TCPIP/192.168.0.7::DF1"
       SerNo="81072027"
       LoopTime="0.001"
       SelectedPlotSet="0">
      <Module
          PartNo=""
          HardwareVer="0.0"/>
      <Module
          PartNo="RMC150E"
          HardwareVer="1.1"
          FWRev="3.30.1A"
          FLASHRev="7.0"
          FWBuildDT="September 30, 2008 (10:41 AM)"
          LdrRev="1.05"
          LdrBuildDT="August 20, 2008 (11:11 AM)"
          BoardRev="1.1B"
          EnetConfig="16#00000000"
          IPAddress="16#C0A80007"
          SubnetMask="16#FFFFFF00"
          DefGateway="16#00000000"
          McastTTL="1"
          McastAddrStart="16#00000000"
          McastAddrCount="0"
          ProAddr="16#0002A000"
          ConAddr="16#00028000"/>
      <Module
          PartNo="M"
          HardwareVer="6.0"/>
      <Module
          PartNo="S"
          HardwareVer="5.0"/>
      <Axis
          AxisType="PosCtlSrv"
          InputType0="Pos"
          FeedbackType0.0="MDT"
          FeedbackModule0.0="Sensor0"
          FeedbackChannel0.0="0"
          OutputType0="Analog"
          OutputModule0="Sensor0"
          OutputChannel0="0"
          Name="Axis0"
          AxisNumber="0"
          ScaleCalcModel="1"
          Pos0="0"
          Pos1="0"
          PosCounts0="0"
          PosCounts1="0"
          VelMaxOutput="0"
          VelMaxVelocity="0"
          VelOffsetCounts="0"
          VelScale="in/Sec"
          MDTDesPosUnits="1.0"
          MDTPosUnitsScale="inch"
          MDTGradient="9.012"
          MDTScale="&#181;s/in"
          MDTRecircs="1"
          MDTOffsetPos="0"
          MDTOffsetCounts="0"
          MDTDirection="0"
          SSIPos0="0"
          SSIPos1="0"
          SSIPosCounts0="0"
          SSIPosCounts1="0"
          SSIPosDirection="0"
          QuadDesPos="1"
          QuadDesPosUnits="inch"
          QuadResCounts="1000"
          QuadResPos="1"
          QuadResPosUnits="inch"
          QuadDirection="0"
          SSIDesPosUnits="1"
          SSIPosUnitsScale="inch"
          SSIGradient=".005"
          SSIResCounts="1000"
          SSIResPos="1.0"
          SSIResPosUnits="inch"
          SSIScale="mm"
          SSIOffsetPos="0"
          SSIOffsetCounts="33"
          SSIDirection="0"
          SSIMinPosRange="0"
          SSIMaxPosRange="0"
          AbsLinRERangeMethod="0"
          RotaryPosUnwind="0"
          RotaryCountUnwind="0"
          RotaryPosUnitRange="0"
          RotaryCustomLBound="0"
          RotaryDirection="0"
          RotaryCntOffset="0"
          RotaryCounts="0"
          RotaryPosUnits="0"
          PrsFrcScaleModel="0"
          Prs0="0"
          Prs1="0"
          PrsCounts0="0"
          PrsCounts1="0"
          PrsFrcMinOutput="0"
          PrsFrcMaxOutput="0"
          PrsFrcMin="0"
          PrsFrcMax="0"
          PrsFrcScale="psi"
          PrsFrcDesUnits="psi"
          DiffFrcActType="0"
          DiffFrcMinOutput="0"
          DiffFrcMaxOutput="10"
          DiffFrcGaugeVal="0"
          DiffFrcGaugeScale="psi"
          DiffFrcCylDiameter="0"
          DiffFrcDiameterScale="in"
          DiffFrcRodDiameter="0"
          DiffFrcDirection="0"
          DiffFrcForceUnits="1"
          DiffFrcForceScale="lb"
          DFMotorMinOutput="0"
          DFMotorMaxOutput="10"
          DFMotorGaugeVal="0"
          DFMotorGaugeScale="psi"
          DFMotorDirection="0"
          DFMotorForceUnits="1"
          DFMotorForceScale="lb"
          AutoStopCfg1="16#00924822"
          AutoStopCfg2="16#00924820"
          AutoStopCfg3="16#00924924"
          HaltGroupNumber="0"
          PriInputBits="16#00000000"
          ActualVelocityCut-offFreq="100"
          ActualAccelCut-offFreq="25"
          StopThreshold="0.1"
          NoiseErrorRate="1000"
          PositionOffset="-0.006496063"
          ActualPositionCut-offFreq="0"
          ModResponse="20"
          ModOrder="1"
          ModGainP="5.945032"
          ModGainN="3.8715467"
          ModTimeConst="0.037089705"
          PositionScale="0.0001968504"
          MDTConfig="16#00018000"
          OutputBits="16#00000001"
          OutputLimit="10"
          OutputBias="0"
          PriControlBits="16#00000001"
          AtSpeedTolerance="0.1"
          VelErrorTolerance="1"
          DefPVCtlMode="0"
          InPositionTolerance="1"
          PosErrorTolerance="1"
          OutputScale="10"
          OutputFilterCut-offFreq="0"
          DeadbandTolerance="0"
          OutputDeadband="0"
          ProportionalGain="20.57"
          IntegralGain="51.16"
          DifferentialGain="0"
          VelFFPos="1.682"
          VelFFNeg="2.583"
          AccelFeedForward="0.0958"
          JerkFeedForward="0"
          AccCtlMode="0"
          OpenLoopHaltRamp="100"
          PositiveTravelLimit="48.1"
          NegativeTravelLimit="-0.1"
          ReqJerk="100000"
          ClosedLoopHaltDecel="10"
          SimBits="16#00000005"
          SystemGain="1"
          NaturalFrequency="20"
          DampingFactor="0.75"
          SimPosPhysLim="0"
          SimNegPhysLim="0"
          SimDeadband="0"
          SimNullOffset="0"
          SimWeight="1000"
          SimMaxForce="10000"
          SimMaxComp="0.01">
         <TuningSetup>
            <TuningCommand
                Command="0"
                Param1=""
                Param2=""
                Param3=""
                Param4=""
                Param5=""
                Param6=""
                Param7=""
                Param8=""
                Param9=""
                BtnText=""/>
            <TuningCommand
                Command="0"
                Param1=""
                Param2=""
                Param3=""
                Param4=""
                Param5=""
                Param6=""
                Param7=""
                Param8=""
                Param9=""
                BtnText=""/>
            <TuningPlotCfg
                PlotCfgID="-1"
                PlotCfgmode="0"/>
            <TuningStatusMap
                NoRegisters="3"
                Register0="32776"
                Register1="32777"
                Register2="32769"/>
         </TuningSetup>
      </Axis>
      <Axis
          AxisType="PosCtlSrv"
          InputType0="Pos"
          FeedbackType0.0="MDT"
          FeedbackModule0.0="Sensor0"
          FeedbackChannel0.0="1"
          OutputType0="Analog"
          OutputModule0="Sensor0"
          OutputChannel0="1"
          Name="Axis1"
          AxisNumber="1"
          ScaleCalcModel="1"
          Pos0="0"
          Pos1="0"
          PosCounts0="0"
          PosCounts1="0"
          VelMaxOutput="0"
          VelMaxVelocity="0"
          VelOffsetCounts="0"
          VelScale="in/Sec"
          MDTDesPosUnits="1.0"
          MDTPosUnitsScale="inch"
          MDTGradient="9.012"
          MDTScale="&#181;s/in"
          MDTRecircs="1"
          MDTOffsetPos="0"
          MDTOffsetCounts="0"
          MDTDirection="0"
          SSIPos0="0"
          SSIPos1="0"
          SSIPosCounts0="0"
          SSIPosCounts1="0"
          SSIPosDirection="0"
          QuadDesPos="1"
          QuadDesPosUnits="inch"
          QuadResCounts="1000"
          QuadResPos="1"
          QuadResPosUnits="inch"
          QuadDirection="0"
          SSIDesPosUnits="1"
          SSIPosUnitsScale="inch"
          SSIGradient=".005"
          SSIResCounts="1000"
          SSIResPos="1.0"
          SSIResPosUnits="inch"
          SSIScale="mm"
          SSIOffsetPos="0"
          SSIOffsetCounts="62"
          SSIDirection="0"
          SSIMinPosRange="0"
          SSIMaxPosRange="0"
          AbsLinRERangeMethod="0"
          RotaryPosUnwind="0"
          RotaryCountUnwind="0"
          RotaryPosUnitRange="0"
          RotaryCustomLBound="0"
          RotaryDirection="0"
          RotaryCntOffset="0"
          RotaryCounts="0"
          RotaryPosUnits="0"
          PrsFrcScaleModel="0"
          Prs0="0"
          Prs1="0"
          PrsCounts0="0"
          PrsCounts1="0"
          PrsFrcMinOutput="0"
          PrsFrcMaxOutput="0"
          PrsFrcMin="0"
          PrsFrcMax="0"
          PrsFrcScale="psi"
          PrsFrcDesUnits="psi"
          DiffFrcActType="0"
          DiffFrcMinOutput="0"
          DiffFrcMaxOutput="10"
          DiffFrcGaugeVal="0"
          DiffFrcGaugeScale="psi"
          DiffFrcCylDiameter="0"
          DiffFrcDiameterScale="in"
          DiffFrcRodDiameter="0"
          DiffFrcDirection="0"
          DiffFrcForceUnits="1"
          DiffFrcForceScale="lb"
          DFMotorMinOutput="0"
          DFMotorMaxOutput="10"
          DFMotorGaugeVal="0"
          DFMotorGaugeScale="psi"
          DFMotorDirection="0"
          DFMotorForceUnits="1"
          DFMotorForceScale="lb"
          AutoStopCfg1="16#00924822"
          AutoStopCfg2="16#00924820"
          AutoStopCfg3="16#00924924"
          HaltGroupNumber="0"
          PriInputBits="16#00000000"
          ActualVelocityCut-offFreq="100"
          ActualAccelCut-offFreq="25"
          StopThreshold="0.1"
          NoiseErrorRate="1000"
          PositionOffset="-0.012204724"
          ActualPositionCut-offFreq="0"
          ModOrder="255"
          PositionScale="0.0001968504"
          MDTConfig="16#00018000"
          OutputBits="16#00000001"
          OutputLimit="10"
          OutputBias="0"
          PriControlBits="16#00000001"
          AtSpeedTolerance="0.1"
          VelErrorTolerance="1"
          DefPVCtlMode="0"
          InPositionTolerance="1"
          PosErrorTolerance="1"
          OutputScale="10"
          OutputFilterCut-offFreq="0"
          DeadbandTolerance="0"
          OutputDeadband="0"
          ProportionalGain="20.57"
          IntegralGain="51.16"
          DifferentialGain="0"
          VelFFPos="1.682"
          VelFFNeg="2.583"
          AccelFeedForward="0.0958"
          JerkFeedForward="0"
          AccCtlMode="0"
          OpenLoopHaltRamp="100"
          PositiveTravelLimit="48.1"
          NegativeTravelLimit="-0.1"
          ReqJerk="100000"
          ClosedLoopHaltDecel="10"
          SimBits="16#00000005"
          SystemGain="1"
          NaturalFrequency="20"
          DampingFactor="0.75"
          SimPosPhysLim="0"
          SimNegPhysLim="0"
          SimDeadband="0"
          SimNullOffset="0"
          SimWeight="1000"
          SimMaxForce="10000"
          SimMaxComp="0.01">
         <TuningSetup>
            <TuningCommand
                Command="0"
                Param1=""
                Param2=""
                Param3=""
                Param4=""
                Param5=""
                Param6=""
                Param7=""
                Param8=""
                Param9=""
                BtnText=""/>
            <TuningCommand
                Command="0"
                Param1=""
                Param2=""
                Param3=""
                Param4=""
                Param5=""
                Param6=""
                Param7=""
                Param8=""
                Param9=""
                BtnText=""/>
            <TuningPlotCfg
                PlotCfgID="-1"
                PlotCfgmode="0"/>
            <TuningStatusMap
                NoRegisters="3"
                Register0="36872"
                Register1="36873"
                Register2="36865"/>
         </TuningSetup>
      </Axis>
      <Axis
          AxisType="PosCtlSrv"
          InputType0="Pos"
          FeedbackType0.0="SSI"
          FeedbackModule0.0="Sensor1"
          FeedbackChannel0.0="0"
          OutputType0="Analog"
          OutputModule0="Sensor1"
          OutputChannel0="0"
          Name="Axis2"
          AxisNumber="2"
          ScaleCalcModel="1"
          Pos0="0"
          Pos1="0"
          PosCounts0="0"
          PosCounts1="0"
          VelMaxOutput="0"
          VelMaxVelocity="0"
          VelOffsetCounts="0"
          VelScale="in/Sec"
          MDTDesPosUnits="1.0"
          MDTPosUnitsScale="inch"
          MDTGradient="9.012"
          MDTScale="&#181;s/in"
          MDTRecircs="1"
          MDTOffsetPos="0"
          MDTOffsetCounts="0"
          MDTDirection="0"
          SSIPos0="0"
          SSIPos1="0"
          SSIPosCounts0="0"
          SSIPosCounts1="0"
          SSIPosDirection="0"
          QuadDesPos="1"
          QuadDesPosUnits="inch"
          QuadResCounts="1000"
          QuadResPos="1"
          QuadResPosUnits="inch"
          QuadDirection="0"
          SSIDesPosUnits="1"
          SSIPosUnitsScale="inch"
          SSIGradient=".005"
          SSIResCounts="1000"
          SSIResPos="1.0"
          SSIResPosUnits="inch"
          SSIScale="mm"
          SSIOffsetPos="0"
          SSIOffsetCounts="79"
          SSIDirection="0"
          SSIMinPosRange="0"
          SSIMaxPosRange="0"
          AbsLinRERangeMethod="0"
          RotaryPosUnwind="0"
          RotaryCountUnwind="0"
          RotaryPosUnitRange="0"
          RotaryCustomLBound="0"
          RotaryDirection="0"
          RotaryCntOffset="0"
          RotaryCounts="0"
          RotaryPosUnits="0"
          PrsFrcScaleModel="0"
          Prs0="0"
          Prs1="0"
          PrsCounts0="0"
          PrsCounts1="0"
          PrsFrcMinOutput="0"
          PrsFrcMaxOutput="0"
          PrsFrcMin="0"
          PrsFrcMax="0"
          PrsFrcScale="psi"
          PrsFrcDesUnits="psi"
          DiffFrcActType="0"
          DiffFrcMinOutput="0"
          DiffFrcMaxOutput="10"
          DiffFrcGaugeVal="0"
          DiffFrcGaugeScale="psi"
          DiffFrcCylDiameter="0"
          DiffFrcDiameterScale="in"
          DiffFrcRodDiameter="0"
          DiffFrcDirection="0"
          DiffFrcForceUnits="1"
          DiffFrcForceScale="lb"
          DFMotorMinOutput="0"
          DFMotorMaxOutput="10"
          DFMotorGaugeVal="0"
          DFMotorGaugeScale="psi"
          DFMotorDirection="0"
          DFMotorForceUnits="1"
          DFMotorForceScale="lb"
          AutoStopCfg1="16#00924822"
          AutoStopCfg2="16#00924820"
          AutoStopCfg3="16#00924924"
          HaltGroupNumber="0"
          PriInputBits="16#00000000"
          ActualVelocityCut-offFreq="100"
          ActualAccelCut-offFreq="25"
          StopThreshold="0.1"
          NoiseErrorRate="1000"
          PositionOffset="-0.0155511815"
          ActualPositionCut-offFreq="0"
          ModOrder="255"
          PositionScale="0.0001968504"
          CountOffset="0"
          MDTConfig="16#00018000"
          OutputBits="16#00000001"
          OutputLimit="10"
          OutputBias="0"
          PriControlBits="16#00000001"
          AtSpeedTolerance="0.1"
          VelErrorTolerance="1"
          DefPVCtlMode="0"
          InPositionTolerance="1"
          PosErrorTolerance="1"
          OutputScale="10"
          OutputFilterCut-offFreq="0"
          DeadbandTolerance="0"
          OutputDeadband="0"
          ProportionalGain="20.57"
          IntegralGain="51.16"
          DifferentialGain="0"
          VelFFPos="1.682"
          VelFFNeg="2.583"
          AccelFeedForward="0.0958"
          JerkFeedForward="0"
          AccCtlMode="0"
          OpenLoopHaltRamp="100"
          PositiveTravelLimit="48.1"
          NegativeTravelLimit="-0.1"
          ReqJerk="100000"
          ClosedLoopHaltDecel="10"
          SimBits="16#00000005"
          SystemGain="1"
          NaturalFrequency="20"
          DampingFactor="0.75"
          SimPosPhysLim="0"
          SimNegPhysLim="0"
          SimDeadband="0"
          SimNullOffset="0"
          SimWeight="1000"
          SimMaxForce="10000"
          SimMaxComp="0.01">
         <TuningSetup>
            <TuningCommand
                Command="0"
                Param1=""
                Param2=""
                Param3=""
                Param4=""
                Param5=""
                Param6=""
                Param7=""
                Param8=""
                Param9=""
                BtnText=""/>
            <TuningCommand
                Command="0"
                Param1=""
                Param2=""
                Param3=""
                Param4=""
                Param5=""
                Param6=""
                Param7=""
                Param8=""
                Param9=""
                BtnText=""/>
            <TuningPlotCfg
                PlotCfgID="-1"
                PlotCfgmode="0"/>
            <TuningStatusMap
                NoRegisters="3"
                Register0="40968"
                Register1="40969"
                Register2="40961"/>
         </TuningSetup>
      </Axis>
      <Axis
          AxisType="PosCtlSrv"
          InputType0="Pos"
          FeedbackType0.0="SSI"
          FeedbackModule0.0="Sensor1"
          FeedbackChannel0.0="1"
          OutputType0="Analog"
          OutputModule0="Sensor1"
          OutputChannel0="1"
          Name="Axis3"
          AxisNumber="3"
          ScaleCalcModel="1"
          Pos0="0"
          Pos1="0"
          PosCounts0="0"
          PosCounts1="0"
          VelMaxOutput="0"
          VelMaxVelocity="0"
          VelOffsetCounts="0"
          VelScale="in/Sec"
          MDTDesPosUnits="1.0"
          MDTPosUnitsScale="inch"
          MDTGradient="9.012"
          MDTScale="&#181;s/in"
          MDTRecircs="1"
          MDTOffsetPos="0"
          MDTOffsetCounts="0"
          MDTDirection="0"
          SSIPos0="0"
          SSIPos1="0"
          SSIPosCounts0="0"
          SSIPosCounts1="0"
          SSIPosDirection="0"
          QuadDesPos="1"
          QuadDesPosUnits="inch"
          QuadResCounts="1000"
          QuadResPos="1"
          QuadResPosUnits="inch"
          QuadDirection="0"
          SSIDesPosUnits="1"
          SSIPosUnitsScale="inch"
          SSIGradient=".005"
          SSIResCounts="1000"
          SSIResPos="1.0"
          SSIResPosUnits="inch"
          SSIScale="mm"
          SSIOffsetPos="0"
          SSIOffsetCounts="218"
          SSIDirection="0"
          SSIMinPosRange="0"
          SSIMaxPosRange="0"
          AbsLinRERangeMethod="0"
          RotaryPosUnwind="0"
          RotaryCountUnwind="0"
          RotaryPosUnitRange="0"
          RotaryCustomLBound="0"
          RotaryDirection="0"
          RotaryCntOffset="0"
          RotaryCounts="0"
          RotaryPosUnits="0"
          PrsFrcScaleModel="0"
          Prs0="0"
          Prs1="0"
          PrsCounts0="0"
          PrsCounts1="0"
          PrsFrcMinOutput="0"
          PrsFrcMaxOutput="0"
          PrsFrcMin="0"
          PrsFrcMax="0"
          PrsFrcScale="psi"
          PrsFrcDesUnits="psi"
          DiffFrcActType="0"
          DiffFrcMinOutput="0"
          DiffFrcMaxOutput="10"
          DiffFrcGaugeVal="0"
          DiffFrcGaugeScale="psi"
          DiffFrcCylDiameter="0"
          DiffFrcDiameterScale="in"
          DiffFrcRodDiameter="0"
          DiffFrcDirection="0"
          DiffFrcForceUnits="1"
          DiffFrcForceScale="lb"
          DFMotorMinOutput="0"
          DFMotorMaxOutput="10"
          DFMotorGaugeVal="0"
          DFMotorGaugeScale="psi"
          DFMotorDirection="0"
          DFMotorForceUnits="1"
          DFMotorForceScale="lb"
          AutoStopCfg1="16#00924822"
          AutoStopCfg2="16#00924820"
          AutoStopCfg3="16#00924924"
          HaltGroupNumber="0"
          PriInputBits="16#00000000"
          ActualVelocityCut-offFreq="100"
          ActualAccelCut-offFreq="25"
          StopThreshold="0.1"
          NoiseErrorRate="1000"
          PositionOffset="-0.042913385"
          ActualPositionCut-offFreq="0"
          ModOrder="255"
          PositionScale="0.0001968504"
          CountOffset="0"
          MDTConfig="16#00018000"
          OutputBits="16#00000001"
          OutputLimit="10"
          OutputBias="0"
          PriControlBits="16#00000001"
          AtSpeedTolerance="0.1"
          VelErrorTolerance="1"
          DefPVCtlMode="0"
          InPositionTolerance="1"
          PosErrorTolerance="1"
          OutputScale="10"
          OutputFilterCut-offFreq="0"
          DeadbandTolerance="0"
          OutputDeadband="0"
          ProportionalGain="20.57"
          IntegralGain="51.16"
          DifferentialGain="0"
          VelFFPos="1.682"
          VelFFNeg="2.583"
          AccelFeedForward="0.0958"
          JerkFeedForward="0"
          AccCtlMode="0"
          OpenLoopHaltRamp="100"
          PositiveTravelLimit="48.1"
          NegativeTravelLimit="-0.1"
          ReqJerk="100000"
          ClosedLoopHaltDecel="10"
          SimBits="16#00000005"
          SystemGain="1"
          NaturalFrequency="20"
          DampingFactor="0.75"
          SimPosPhysLim="0"
          SimNegPhysLim="0"
          SimDeadband="0"
          SimNullOffset="0"
          SimWeight="1000"
          SimMaxForce="10000"
          SimMaxComp="0.01">
         <TuningSetup>
            <TuningCommand
                Command="0"
                Param1=""
                Param2=""
                Param3=""
                Param4=""
                Param5=""
                Param6=""
                Param7=""
                Param8=""
                Param9=""
                BtnText=""/>
            <TuningCommand
                Command="0"
                Param1=""
                Param2=""
                Param3=""
                Param4=""
                Param5=""
                Param6=""
                Param7=""
                Param8=""
                Param9=""
                BtnText=""/>
            <TuningPlotCfg
                PlotCfgID="-1"
                PlotCfgmode="0"/>
            <TuningStatusMap
                NoRegisters="3"
                Register0="45064"
                Register1="45065"
                Register2="45057"/>
         </TuningSetup>
      </Axis>
      <PlotSchema
          NoofPlots="8"
          NoofItems="16"
          Name="Plot Set 0">
         <Plot
             Name=""
             PlotCfgMode="0"
             NoofSamples="25001"
             SamplePeriodS="0.001"
             AssignedToAxis="0"
             TriggerPercent="-1"
             TriggerType="16#00000001"/>
         <Plot
             Name=""
             PlotCfgMode="0"
             NoofSamples="1000"
             SamplePeriodS="0.001"
             AssignedToAxis="1"
             TriggerPercent="-1"
             TriggerType="16#00000001"/>
         <Plot
             Name=""
             PlotCfgMode="0"
             NoofSamples="1000"
             SamplePeriodS="0.001"
             AssignedToAxis="2"
             TriggerPercent="-1"
             TriggerType="16#00000001"/>
         <Plot
             Name=""
             PlotCfgMode="0"
             NoofSamples="1000"
             SamplePeriodS="0.001"
             AssignedToAxis="3"
             TriggerPercent="-1"
             TriggerType="16#00000001"/>
         <Plot
             Name=""
             PlotCfgMode="0"
             NoofSamples="1000"
             SamplePeriodS="0.001"
             AssignedToAxis="0"
             TriggerPercent="-1"
             TriggerType="16#00000001"/>
         <Plot
             Name=""
             PlotCfgMode="0"
             NoofSamples="1000"
             SamplePeriodS="0.001"
             AssignedToAxis="0"
             TriggerPercent="-1"
             TriggerType="16#00000001"/>
         <Plot
             Name=""
             PlotCfgMode="0"
             NoofSamples="1000"
             SamplePeriodS="0.001"
             AssignedToAxis="0"
             TriggerPercent="-1"
             TriggerType="16#00000001"/>
         <Plot
             Name=""
             PlotCfgMode="0"
             NoofSamples="1000"
             SamplePeriodS="0.001"
             AssignedToAxis="0"
             TriggerPercent="-1"
             TriggerType="16#00000001"/>
      </PlotSchema>
      <Tasks
          TaskCount="2"
          EnablePreScan="True"
          StopTasksOnHalt="0"
          StartupMode="1"
          RunProgInput="0"/>
      <ShortcutKeySet
          Name="Set 1">
         <ShortcutKey
             Key="0">
            <ShortcutAction
                Axis="0"
                Command="90"
                Param1="0"
                Param2="StopPressing"
                Param3=""
                Param4=""
                Param5=""
                Param6=""
                Param7=""
                Param8=""
                Param9=""/>
         </ShortcutKey>
         <ShortcutKey
             Key="1">
            <ShortcutAction
                Axis="0"
                Command="90"
                Param1="0"
                Param2="PressFWD"
                Param3=""
                Param4=""
                Param5=""
                Param6=""
                Param7=""
                Param8=""
                Param9=""/>
         </ShortcutKey>
         <ShortcutKey
             Key="2">
            <ShortcutAction
                Axis="0"
                Command="90"
                Param1="0"
                Param2="PressREV"
                Param3=""
                Param4=""
                Param5=""
                Param6=""
                Param7=""
                Param8=""
                Param9=""/>
         </ShortcutKey>
         <ShortcutKey
             Key="3"/>
         <ShortcutKey
             Key="4">
            <ShortcutAction
                Axis="0"
                Command="9"
                Param1="10.0"
                Param2="5.0"
                Param3=""
                Param4=""
                Param5=""
                Param6=""
                Param7=""
                Param8=""
                Param9=""/>
            <ShortcutAction
                Axis="1"
                Command="9"
                Param1="10.0"
                Param2="5.0"
                Param3=""
                Param4=""
                Param5=""
                Param6=""
                Param7=""
                Param8=""
                Param9=""/>
            <ShortcutAction
                Axis="2"
                Command="9"
                Param1="10.0"
                Param2="5.0"
                Param3=""
                Param4=""
                Param5=""
                Param6=""
                Param7=""
                Param8=""
                Param9=""/>
            <ShortcutAction
                Axis="3"
                Command="9"
                Param1="10.0"
                Param2="5.0"
                Param3=""
                Param4=""
                Param5=""
                Param6=""
                Param7=""
                Param8=""
                Param9=""/>
         </ShortcutKey>
         <ShortcutKey
             Key="5"/>
         <ShortcutKey
             Key="6">
            <ShortcutAction
                Axis="0"
                Command="3"
                Param1=""
                Param2=""
                Param3=""
                Param4=""
                Param5=""
                Param6=""
                Param7=""
                Param8=""
                Param9=""/>
            <ShortcutAction
                Axis="1"
                Command="3"
                Param1=""
                Param2=""
                Param3=""
                Param4=""
                Param5=""
                Param6=""
                Param7=""
                Param8=""
                Param9=""/>
            <ShortcutAction
                Axis="2"
                Command="3"
                Param1=""
                Param2=""
                Param3=""
                Param4=""
                Param5=""
                Param6=""
                Param7=""
                Param8=""
                Param9=""/>
            <ShortcutAction
                Axis="3"
                Command="3"
                Param1=""
                Param2=""
                Param3=""
                Param4=""
                Param5=""
                Param6=""
                Param7=""
                Param8=""
                Param9=""/>
         </ShortcutKey>
         <ShortcutKey
             Key="7"/>
         <ShortcutKey
             Key="8">
            <ShortcutAction
                Axis="0"
                Command="9"
                Param1="2.0"
                Param2="2.0"
                Param3=""
                Param4=""
                Param5=""
                Param6=""
                Param7=""
                Param8=""
                Param9=""/>
            <ShortcutAction
                Axis="1"
                Command="9"
                Param1="2.0"
                Param2="2.0"
                Param3=""
                Param4=""
                Param5=""
                Param6=""
                Param7=""
                Param8=""
                Param9=""/>
            <ShortcutAction
                Axis="2"
                Command="9"
                Param1="2.0"
                Param2="2.0"
                Param3=""
                Param4=""
                Param5=""
                Param6=""
                Param7=""
                Param8=""
                Param9=""/>
            <ShortcutAction
                Axis="3"
                Command="9"
                Param1="2.0"
                Param2="2.0"
                Param3=""
                Param4=""
                Param5=""
                Param6=""
                Param7=""
                Param8=""
                Param9=""/>
         </ShortcutKey>
         <ShortcutKey
             Key="9">
            <ShortcutAction
                Axis="0"
                Command="9"
                Param1="-2.0"
                Param2="2.0"
                Param3=""
                Param4=""
                Param5=""
                Param6=""
                Param7=""
                Param8=""
                Param9=""/>
            <ShortcutAction
                Axis="1"
                Command="9"
                Param1="-2.0"
                Param2="2.0"
                Param3=""
                Param4=""
                Param5=""
                Param6=""
                Param7=""
                Param8=""
                Param9=""/>
            <ShortcutAction
                Axis="2"
                Command="9"
                Param1="-2.0"
                Param2="2.0"
                Param3=""
                Param4=""
                Param5=""
                Param6=""
                Param7=""
                Param8=""
                Param9=""/>
            <ShortcutAction
                Axis="3"
                Command="9"
                Param1="-2.0"
                Param2="2.0"
                Param3=""
                Param4=""
                Param5=""
                Param6=""
                Param7=""
                Param8=""
                Param9=""/>
         </ShortcutKey>
      </ShortcutKeySet>
      <IndirectDataMap>
         <MapEntry
             Offset="0"
             RegisterAddress="%MD8.0"/>
         <MapEntry
             Offset="1"
             RegisterAddress="%MD8.1"/>
         <MapEntry
             Offset="2"
             RegisterAddress="%MD8.8"/>
         <MapEntry
             Offset="3"
             RegisterAddress="%MD8.56"/>
         <MapEntry
             Offset="4"
             RegisterAddress="%MD8.33"/>
         <MapEntry
             Offset="5"
             RegisterAddress="%MD9.0"/>
         <MapEntry
             Offset="6"
             RegisterAddress="%MD9.1"/>
         <MapEntry
             Offset="7"
             RegisterAddress="%MD9.8"/>
         <MapEntry
             Offset="8"
             RegisterAddress="%MD9.56"/>
         <MapEntry
             Offset="9"
             RegisterAddress="%MD9.33"/>
         <MapEntry
             Offset="10"
             RegisterAddress="%MD10.0"/>
         <MapEntry
             Offset="11"
             RegisterAddress="%MD10.1"/>
         <MapEntry
             Offset="12"
             RegisterAddress="%MD10.8"/>
         <MapEntry
             Offset="13"
             RegisterAddress="%MD10.56"/>
         <MapEntry
             Offset="14"
             RegisterAddress="%MD10.33"/>
         <MapEntry
             Offset="15"
             RegisterAddress="%MD11.0"/>
         <MapEntry
             Offset="16"
             RegisterAddress="%MD11.1"/>
         <MapEntry
             Offset="17"
             RegisterAddress="%MD11.8"/>
         <MapEntry
             Offset="18"
             RegisterAddress="%MD11.56"/>
         <MapEntry
             Offset="19"
             RegisterAddress="%MD11.33"/>
         <MapEntry
             Offset="20"
             RegisterAddress="%MD14.8"/>
         <MapEntry
             Offset="21"
             RegisterAddress="%MD15.8"/>
         <MapEntry
             Offset="22"
             RegisterAddress="%MD16.8"/>
         <MapEntry
             Offset="23"
             RegisterAddress="%MD17.8"/>
         <MapEntry
             Offset="24"
             RegisterAddress="%MD12.8"/>
         <MapEntry
             Offset="25"
             RegisterAddress="%MD13.8"/>
         <MapEntry
             Offset="26"
             RegisterAddress="%MD56.0"/>
      </IndirectDataMap>
      <EventLogMgr>
         <ELogFilterController
             ControllerBits="16#00000007"/>
         <ELogFilterAxis
             AxisBits="16#0000000F"/>
         <ELogFilterAxis
             AxisBits="16#0000000F"/>
         <ELogFilterAxis
             AxisBits="16#0000000F"/>
         <ELogFilterAxis
             AxisBits="16#0000000F"/>
         <ELogFilterAxis
             AxisBits="16#0000000F"/>
         <ELogFilterAxis
             AxisBits="16#0000000F"/>
         <ELogFilterAxis
             AxisBits="16#0000000F"/>
         <ELogFilterAxis
             AxisBits="16#0000000F"/>
         <ELogFilterAxis
             AxisBits="16#0000000F"/>
         <ELogFilterAxis
             AxisBits="16#0000000F"/>
         <ELogFilterAxis
             AxisBits="16#0000000F"/>
         <ELogFilterAxis
             AxisBits="16#0000000F"/>
         <ELogFilterAxis
             AxisBits="16#0000000F"/>
         <ELogFilterAxis
             AxisBits="16#0000000F"/>
         <ELogFilterAxis
             AxisBits="16#0000000F"/>
         <ELogFilterAxis
             AxisBits="16#0000000F"/>
         <ELogFilterAxis
             AxisBits="16#0000000F"/>
         <ELogFilterTask
             TaskBits="16#0000000F"/>
         <ELogFilterTask
             TaskBits="16#0000000D"/>
         <ELogFilterTask
             TaskBits="16#0000000C"/>
         <ELogFilterTask
             TaskBits="16#0000000D"/>
         <ELogFilterTask
             TaskBits="16#0000000D"/>
         <ELogFilterTask
             TaskBits="16#0000000D"/>
         <ELogFilterTask
             TaskBits="16#0000000D"/>
         <ELogFilterTask
             TaskBits="16#0000000D"/>
         <ELogFilterTask
             TaskBits="16#0000000D"/>
         <ELogFilterTask
             TaskBits="16#0000000D"/>
         <ELogFilterTask
             TaskBits="16#0000000D"/>
         <ELogFilterUSB
             USBBits="16#00000040"/>
         <ELogFilterEthernet
             EthernetBits="16#0000017C"/>
      </EventLogMgr>
      <VariableTable>
         <Variable
             Offset="0"
             TagName="Skewed"
             Format="REAL"
             DefaultValue="0"
             Description="0 = no skew, 1 = skew occurred. PLC reads this via Indirect Data Map."/>
         <Variable
             Offset="1"
             TagName="FwdVoltage"
             Format="REAL"
             DefaultValue="5"
             Description="Max. voltage for forward move."/>
         <Variable
             Offset="2"
             TagName="MaxSkew"
             Format="REAL"
             DefaultValue="0.4"
             Description="Max skew allowed."/>
         <Variable
             Offset="3"
             TagName="MaxVoltage"
             Format="REAL"
             DefaultValue="5"
             Description="Max Voltage used in the synched open loop"/>
         <Variable
             Offset="4"
             TagName="OLRampRate"
             Format="REAL"
             DefaultValue="5"
             Description="Rate to ramp up to MaxVoltage."/>
         <Variable
             Offset="5"
             TagName="PosTarFWD"
             Format="REAL"
             DefaultValue="0.1"
             Description="Final Position Target FWD"/>
         <Variable
             Offset="6"
             TagName="PosTarREV"
             Format="REAL"
             DefaultValue="48"
             Description="Final Position Target REV"/>
         <Variable
             Offset="7"
             TagName="RevVoltage"
             Format="REAL"
             DefaultValue="-5"
             Description="Max. voltage for reverse move."/>
         <Variable
             Offset="8"
             TagName="SpeedUpTC"
             Format="REAL"
             DefaultValue="0.05"
             Description="Time Constant for speeding back up if possible. approx. 0.001 to 0.5"/>
         <Variable
             Offset="9"
             TagName="CurrentSkew"
             Format="REAL"
             DefaultValue="0"
             Description="The current skew of the 4 axes."/>
         <Variable
             Offset="10"
             TagName="MinCurrPos"
             Format="REAL"
             DefaultValue="0"
             Description="Calculated and used by the user program."/>
         <Variable
             Offset="11"
             TagName="Axis0Voltage"
             Format="REAL"
             DefaultValue="0"
             Description="Calculated and used by the user program."/>
         <Variable
             Offset="12"
             TagName="Axis1Voltage"
             Format="REAL"
             DefaultValue="0"
             Description="Calculated and used by the user program."/>
         <Variable
             Offset="13"
             TagName="Axis2Voltage"
             Format="REAL"
             DefaultValue="0"
             Description="Calculated and used by the user program."/>
         <Variable
             Offset="14"
             TagName="Axis3Voltage"
             Format="REAL"
             DefaultValue="0"
             Description="Calculated and used by the user program."/>
         <Variable
             Offset="15"
             TagName="ProTerm0"
             Format="REAL"
             DefaultValue="0"
             Description="Calculated and used by the user program."/>
         <Variable
             Offset="16"
             TagName="ProTerm1"
             Format="REAL"
             DefaultValue="0"
             Description="Calculated and used by the user program."/>
         <Variable
             Offset="17"
             TagName="ProTerm2"
             Format="REAL"
             DefaultValue="0"
             Description="Calculated and used by the user program."/>
         <Variable
             Offset="18"
             TagName="ProTerm3"
             Format="REAL"
             DefaultValue="0"
             Description="Calculated and used by the user program."/>
         <Variable
             Offset="19"
             TagName="IntTerm0"
             Format="REAL"
             DefaultValue="0"
             Description="Calculated and used by the user program."/>
         <Variable
             Offset="20"
             TagName="IntTerm1"
             Format="REAL"
             DefaultValue="0"
             Description="Calculated and used by the user program."/>
         <Variable
             Offset="21"
             TagName="IntTerm2"
             Format="REAL"
             DefaultValue="0"
             Description="Calculated and used by the user program."/>
         <Variable
             Offset="22"
             TagName="IntTerm3"
             Format="REAL"
             DefaultValue="0"
             Description="Calculated and used by the user program."/>
         <Variable
             Offset="23"
             TagName="OLPosError0"
             Format="REAL"
             DefaultValue="0"
             Description="Calculated and used by the user program."/>
         <Variable
             Offset="24"
             TagName="OLPosError1"
             Format="REAL"
             DefaultValue="0"
             Description="Calculated and used by the user program."/>
         <Variable
             Offset="25"
             TagName="OLPosError2"
             Format="REAL"
             DefaultValue="0"
             Description="Calculated and used by the user program."/>
         <Variable
             Offset="26"
             TagName="OLPosError3"
             Format="REAL"
             DefaultValue="0"
             Description="Calculated and used by the user program."/>
         <Variable
             Offset="27"
             TagName="MaxCtrlOut"
             Format="REAL"
             DefaultValue="0"
             Description="Calculated and used by the user program."/>
         <Variable
             Offset="28"
             TagName="SpeedUpFactor"
             Format="REAL"
             DefaultValue="0"
             Description="Calculated and used by the user program. From the SpeedUpTC."/>
         <Variable
             Offset="29"
             TagName="Unwind"
             Format="REAL"
             DefaultValue="0"
             Description="Calculated and used by the user program."/>
         <Variable
             Offset="30"
             TagName="OLTarOutput"
             Format="REAL"
             DefaultValue="0"
             Description="Calculated and used by the user program."/>
         <Variable
             Offset="31"
             TagName="LastSkewed"
             Format="REAL"
             DefaultValue="0"
             Description="Saves the last state of skewed."/>
         <Variable
             Offset="32"
             TagName="MaxCurrPos"
             Format="REAL"
             DefaultValue="0"
             Description="Calculated and used by the user program."/>
         <Variable
             Offset="33"
             TagName="MinCtrlOut"
             Format="REAL"
             DefaultValue="0"/>
      </VariableTable>
      <DiscreteIO>
         <IOPoint
             PointNumber="32"
             Type="Output"
             ProgState="Hold"
             FaultState="Off"
             Comment=""/>
         <IOPoint
             PointNumber="33"
             Type="Output"
             ProgState="Hold"
             FaultState="Off"
             Comment=""/>
         <IOPoint
             PointNumber="224"
             Type="Input"
             Comment=""/>
         <IOPoint
             PointNumber="225"
             Type="Input"
             Comment=""/>
      </DiscreteIO>
      <UserProgramMgr
          EnableExprLogging="True"
          EnableICMDLogging="True"
          SecurityFlags="16#00000000"
          Copyright=""
          Password="">
         <UserProgram
             Name="Background Events"
             Type="POLL"
             Desc=""
             IncludeInBuild="True">
            <ProgramBlock
                Type="POLL"/>
         </UserProgram>
         <UserProgram
             Name="PreScan Table"
             Type="POLL"
             Desc=""
             IncludeInBuild="True">
            <ProgramBlock
                Type="POLL">
               <PollItem
                   Condition="_FirstScan"
                   Task1Action="SkewDetect"
                   Task4Action=""
                   Task5Action=""
                   Task6Action=""
                   Task7Action=""
                   Task8Action=""
                   Task9Action=""
                   Description=""/>
            </ProgramBlock>
         </UserProgram>
         <UserProgram
             Name="PressOLSyncFwd"
             Type="STEP"
             Number="0"
             Desc="This program will give OL to 4 axis and use a PI on the position to subtract from the OL to keep them in sync.&#13;&#10;&#13;&#10;The SkewDetect program (which should be running simultaneously) will halt the axes and stop the programs if the max skew is ever exceeded.&#13;&#10;&#13;&#10;This program should be started by the Start program which will start this and the SkewDetect program. The PLC must stop this program also.&#13;&#10;&#13;&#10;The &apos;Stop All Tasks on any Axis Halt&apos; option should be cleared in the Program Configuration Properties. Make sure to have the press axes in the same Halt Group (In the Axis Paramters, All Tab, Halts), it must be a non-zero number."
             IncludeInBuild="True"
             SingleInstance="False"
             TaskMask="32767">
            <ProgramBlock
                Type="STEP">
               <Comment
                   Comment="Set the voltage for forward motion."/>
               <Step>
                  <Expression
                      Src="MaxVoltage := FwdVoltage&#13;&#10;"/>
               </Step>
               <Transition>
                  <Jump
                      Type="NEXT"/>
               </Transition>
            </ProgramBlock>
            <ProgramBlock
                Type="STEP">
               <Comment
                   Comment="Clear out the OL integrators.&#13;&#10;Issue open loop command to all axes to start the press stroke."/>
               <Step>
                  <Expression
                      Src="IntTerm0 := 0.0;&#13;&#10;IntTerm1 := 0.0;&#13;&#10;IntTerm2 := 0.0;&#13;&#10;IntTerm3 := 0.0;&#13;&#10;OLTarOutput := 0.0;&#13;&#10;SpeedUpFactor := 1.0 - EXP(-_LoopTime/SpeedUpTC);"/>
                  <Command
                      Command="10"
                      CmdAxes="15"
                      CmdPrm1="0.0"
                      CmdPrm2="100000.0"/>
               </Step>
               <Transition>
                  <Jump
                      Type="NEXT"/>
               </Transition>
            </ProgramBlock>
            <ProgramBlock
                Type="STEP"
                Label="OL_SyncFWD">
               <Step>
                  <Expression
                      Src="OLTarOutput := MIN(MaxVoltage, OLTarOutput + OLRampRate * _LoopTime);"/>
                  <Expression
                      Src="MaxCurrPos := MAX(_Axis[0].ActPos, MAX(_Axis[1].ActPos,MAX(_Axis[2].ActPos,_Axis[3].ActPos)));&#13;&#10;MinCurrPos := MIN(_Axis[0].ActPos, MIN(_Axis[1].ActPos,MIN(_Axis[2].ActPos,_Axis[3].ActPos)));&#13;&#10;MaxCtrlOut := MAX(_Axis[0].ControlOutput, MAX(_Axis[1].ControlOutput, MAX(_Axis[2].ControlOutput, _Axis[3].ControlOutput)));&#13;&#10;&#13;&#10;OLPosError0 := (MinCurrPos - _Axis[0].ActPos);&#13;&#10;OLPosError1 := (MinCurrPos - _Axis[1].ActPos);&#13;&#10;OLPosError2 := (MinCurrPos - _Axis[2].ActPos);&#13;&#10;OLPosError3 := (MinCurrPos - _Axis[3].ActPos);&#13;&#10;&#13;&#10;ProTerm0 := _Axis[0].PropGain * OLPosError0;&#13;&#10;ProTerm1 := _Axis[1].PropGain * OLPosError1;&#13;&#10;ProTerm2 := _Axis[2].PropGain * OLPosError2;&#13;&#10;ProTerm3 := _Axis[3].PropGain * OLPosError3;&#13;&#10;&#13;&#10;Unwind := SpeedUpFactor * (OLTarOutput - MaxCtrlOut)*10.0;&#13;&#10;&#13;&#10;IntTerm0 := LIMIT( -100.0 - ProTerm0, IntTerm0 + _Axis[0].IntGain * OLPosError0 * _LoopTime + Unwind, OLTarOutput * 10.0 - ProTerm0);&#13;&#10;IntTerm1 := LIMIT( -100.0 - ProTerm1, IntTerm1 + _Axis[1].IntGain * OLPosError1 * _LoopTime + Unwind, OLTarOutput * 10.0 - ProTerm1);&#13;&#10;IntTerm2 := LIMIT( -100.0 - ProTerm2, IntTerm2 + _Axis[2].IntGain * OLPosError2 * _LoopTime + Unwind, OLTarOutput * 10.0 - ProTerm2);&#13;&#10;IntTerm3 := LIMIT( -100.0 - ProTerm3, IntTerm3 + _Axis[3].IntGain * OLPosError3 * _LoopTime + Unwind, OLTarOutput * 10.0 - ProTerm3);&#13;&#10;&#13;&#10;Axis0Voltage := OLTarOutput + (ProTerm0 + IntTerm0)*0.1;&#13;&#10;Axis1Voltage := OLTarOutput + (ProTerm1 + IntTerm1)*0.1;&#13;&#10;Axis2Voltage := OLTarOutput + (ProTerm2 + IntTerm2)*0.1;&#13;&#10;Axis3Voltage := OLTarOutput + (ProTerm3 + IntTerm3)*0.1;&#10;"/>
                  <Command
                      Command="10"
                      CmdAxes="1"
                      CmdPrm1="Axis0Voltage"
                      CmdPrm2="100000.0"/>
                  <Command
                      Command="10"
                      CmdAxes="2"
                      CmdPrm1="Axis1Voltage"
                      CmdPrm2="100000.0"/>
                  <Command
                      Command="10"
                      CmdAxes="4"
                      CmdPrm1="Axis2Voltage"
                      CmdPrm2="100000.0"/>
                  <Command
                      Command="10"
                      CmdAxes="8"
                      CmdPrm1="Axis3Voltage"
                      CmdPrm2="100000.0"/>
               </Step>
               <Transition>
                  <CheckCondition
                      Type="IF-THEN-ELSE"
                      Condition="MaxCurrPos &gt;= (PosTarFWD - 0.1)"
                      True="Next"
                      False="OL_SyncFWD"/>
               </Transition>
            </ProgramBlock>
            <ProgramBlock
                Type="STEP">
               <Comment
                   Comment="This command wil stop the axes at a certain position."/>
               <Step>
                  <Command
                      Command="36"
                      CmdAxes="15"
                      CmdPrm1="PosTarFWD"
                      CmdPrm2="0.0"/>
               </Step>
               <Transition>
                  <CheckCondition
                      Type="IF-THEN"
                      Condition="_Axis[0].StatusBits.9 AND _Axis[1].StatusBits.9 AND _Axis[2].StatusBits.9 AND _Axis[3].StatusBits.9"
                      True="Next"/>
               </Transition>
            </ProgramBlock>
            <ProgramBlock
                Type="STEP">
               <Comment
                   Comment="This command is just so the In Position bit will turn on."/>
               <Step>
                  <Command
                      Command="5"
                      CmdAxes="15"/>
               </Step>
               <Transition>
                  <End/>
               </Transition>
            </ProgramBlock>
         </UserProgram>
         <UserProgram
             Name="StopPressing"
             Type="STEP"
             Number="8"
             Desc="This program gracefully stops the pressing cycle."
             IncludeInBuild="True"
             SingleInstance="False"
             TaskMask="32767">
            <ProgramBlock
                Type="STEP">
               <Comment
                   Comment="Stops all the axes and waits for the Target Generator Done bit."/>
               <Step>
                  <Command
                      Command="6"
                      CmdAxes="15"
                      CmdPrm1="30.0"/>
               </Step>
               <Transition>
                  <CheckCondition
                      Type="IF-THEN"
                      Condition="_Axis[0].StatusBits.9 AND _Axis[1].StatusBits.9 AND _Axis[2].StatusBits.9 AND _Axis[3].StatusBits.9"
                      True="Next"/>
               </Transition>
            </ProgramBlock>
            <ProgramBlock
                Type="STEP">
               <Comment
                   Comment="Move axes to the minimum pos of all the axes."/>
               <Step>
                  <Command
                      Command="20"
                      CmdAxes="15"
                      CmdPrm1="MIN(_Axis[0].ActPos, MIN(_Axis[1].ActPos, MIN(_Axis[2].ActPos,_Axis[3].ActPos)))"
                      CmdPrm2="1.0"
                      CmdPrm3="1.0"
                      CmdPrm4="1.0"
                      CmdPrm5="Nearest (0)"/>
               </Step>
               <Transition>
                  <End/>
               </Transition>
            </ProgramBlock>
         </UserProgram>
         <UserProgram
             Name="SkewDetect"
             Type="STEP"
             Number="10"
             Desc="This program runs on task 1 started by the PreScran Table on FirstScan. If skew occurs, stops task 0 (the main press program) and halt all the axes.&#13;&#10;This program runs continuously."
             IncludeInBuild="True"
             SingleInstance="False"
             TaskMask="32767">
            <ProgramBlock
                Type="STEP">
               <Step>
                  <Expression
                      Src="LastSkewed := 0.0;&#13;&#10;Skewed := 0.0;"/>
               </Step>
               <Transition>
                  <Jump
                      Type="NEXT"/>
               </Transition>
            </ProgramBlock>
            <ProgramBlock
                Type="STEP"
                Label="CheckSkew">
               <Comment
                   Comment="Calculates skew. If axis just became skewed, then stop axes and task 0, which is running the main press program."/>
               <Step>
                  <Expression
                      Src="LastSkewed := CurrentSkew;&#13;&#10;CurrentSkew := &#32;MAX(_Axis[0].ActPos, MAX(_Axis[1].ActPos,MAX(_Axis[2].ActPos,_Axis[3].ActPos))) - &#13;&#10;MIN(_Axis[0].ActPos, MIN(_Axis[1].ActPos,MIN(_Axis[2].ActPos,_Axis[3].ActPos)));&#13;&#10;IF CurrentSkew &gt;= MaxSkew THEN&#13;&#10;&#9;Skewed := 1.0;&#13;&#10;ELSE&#13;&#10;&#9;Skewed := 0.0;&#13;&#10;END_IF"/>
               </Step>
               <Transition>
                  <CheckCondition
                      Type="IF-THEN-ELSE"
                      Condition="Skewed = 1.0 AND LastSkewed = 0.0"
                      True="Next"
                      False="CheckSkew"/>
               </Transition>
            </ProgramBlock>
            <ProgramBlock
                Type="STEP">
               <Step>
                  <Command
                      Command="91"
                      CmdAxes="1"
                      CmdPrm1="0"/>
                  <Expression
                      Src="Skewed := 1.0;"/>
               </Step>
               <Transition>
                  <Jump
                      Type="NEXT"/>
               </Transition>
            </ProgramBlock>
            <ProgramBlock
                Type="STEP">
               <Step>
                  <Command
                      Command="2"
                      CmdAxes="15"/>
               </Step>
               <Transition>
                  <Jump
                      Type="JUMP"
                      Next="CheckSkew"/>
               </Transition>
            </ProgramBlock>
         </UserProgram>
         <UserProgram
             Name="PressOLSyncRev"
             Type="STEP"
             Number="1"
             Desc="This program will give OL to 4 axis and use a PI on the position to subtract from the OL to keep them in sync.&#13;&#10;&#13;&#10;The SkewDetect program (which should be running simultaneously) will halt the axes and stop the programs if the max skew is ever exceeded.&#13;&#10;&#13;&#10;This program should be started by the Start program which will start this and the SkewDetect program. The PLC must stop this program also.&#13;&#10;&#13;&#10;The &apos;Stop All Tasks on any Axis Halt&apos; option should be cleared in the Program Configuration Properties. Make sure to have the press axes in the same Halt Group (In the Axis Paramters, All Tab, Halts), it must be a non-zero number."
             IncludeInBuild="True"
             SingleInstance="False"
             TaskMask="32767">
            <ProgramBlock
                Type="STEP">
               <Comment
                   Comment="Set the voltage for forward motion."/>
               <Step>
                  <Expression
                      Src="MaxVoltage := RevVoltage&#13;&#10;"/>
               </Step>
               <Transition>
                  <Jump
                      Type="NEXT"/>
               </Transition>
            </ProgramBlock>
            <ProgramBlock
                Type="STEP">
               <Comment
                   Comment="Clear out the OL integrators.&#13;&#10;Issue open loop command to all axes to start the press stroke."/>
               <Step>
                  <Expression
                      Src="IntTerm0 := 0.0;&#13;&#10;IntTerm1 := 0.0;&#13;&#10;IntTerm2 := 0.0;&#13;&#10;IntTerm3 := 0.0;&#13;&#10;OLTarOutput := 0.0;&#13;&#10;SpeedUpFactor := 1.0 - EXP(-_LoopTime/SpeedUpTC);"/>
                  <Command
                      Command="10"
                      CmdAxes="15"
                      CmdPrm1="0.0"
                      CmdPrm2="100000.0"/>
               </Step>
               <Transition>
                  <Jump
                      Type="NEXT"/>
               </Transition>
            </ProgramBlock>
            <ProgramBlock
                Type="STEP"
                Label="OL_SyncREV">
               <Step>
                  <Expression
                      Src="OLTarOutput := MAX(MaxVoltage, OLTarOutput - OLRampRate * _LoopTime);"/>
                  <Expression
                      Src="MaxCurrPos := MAX(_Axis[0].ActPos, MAX(_Axis[1].ActPos,MAX(_Axis[2].ActPos,_Axis[3].ActPos)));&#13;&#10;MinCurrPos := MIN(_Axis[0].ActPos, MIN(_Axis[1].ActPos,MIN(_Axis[2].ActPos,_Axis[3].ActPos)));&#13;&#10;MinCtrlOut := MIN(_Axis[0].ControlOutput, MIN(_Axis[1].ControlOutput, MIN(_Axis[2].ControlOutput, _Axis[3].ControlOutput)));&#13;&#10;&#13;&#10;OLPosError0 := (MaxCurrPos - _Axis[0].ActPos);&#13;&#10;OLPosError1 := (MaxCurrPos - _Axis[1].ActPos);&#13;&#10;OLPosError2 := (MaxCurrPos - _Axis[2].ActPos);&#13;&#10;OLPosError3 := (MaxCurrPos - _Axis[3].ActPos);&#13;&#10;&#13;&#10;ProTerm0 := _Axis[0].PropGain * OLPosError0;&#13;&#10;ProTerm1 := _Axis[1].PropGain * OLPosError1;&#13;&#10;ProTerm2 := _Axis[2].PropGain * OLPosError2;&#13;&#10;ProTerm3 := _Axis[3].PropGain * OLPosError3;&#13;&#10;&#13;&#10;Unwind := SpeedUpFactor * (OLTarOutput - MinCtrlOut)*10.0;&#13;&#10;&#13;&#10;IntTerm0 := LIMIT( OLTarOutput * 10.0 - ProTerm0, IntTerm0 + _Axis[0].IntGain * OLPosError0 * _LoopTime + Unwind, 100.0 - ProTerm0);&#13;&#10;IntTerm1 := LIMIT( OLTarOutput * 10.0 - ProTerm1, IntTerm1 + _Axis[1].IntGain * OLPosError1 * _LoopTime + Unwind, 100.0 - ProTerm1);&#13;&#10;IntTerm2 := LIMIT( OLTarOutput * 10.0 - ProTerm2, IntTerm2 + _Axis[2].IntGain * OLPosError2 * _LoopTime + Unwind, 100.0 - ProTerm2);&#13;&#10;IntTerm3 := LIMIT( OLTarOutput * 10.0 - ProTerm3, IntTerm3 + _Axis[3].IntGain * OLPosError3 * _LoopTime + Unwind, 100.0 - ProTerm3);&#13;&#10;&#13;&#10;Axis0Voltage := OLTarOutput + (ProTerm0 + IntTerm0)*0.1;&#13;&#10;Axis1Voltage := OLTarOutput + (ProTerm1 + IntTerm1)*0.1;&#13;&#10;Axis2Voltage := OLTarOutput + (ProTerm2 + IntTerm2)*0.1;&#13;&#10;Axis3Voltage := OLTarOutput + (ProTerm3 + IntTerm3)*0.1;&#10;"/>
                  <Command
                      Command="10"
                      CmdAxes="1"
                      CmdPrm1="Axis0Voltage"
                      CmdPrm2="100000.0"/>
                  <Command
                      Command="10"
                      CmdAxes="2"
                      CmdPrm1="Axis1Voltage"
                      CmdPrm2="100000.0"/>
                  <Command
                      Command="10"
                      CmdAxes="4"
                      CmdPrm1="Axis2Voltage"
                      CmdPrm2="100000.0"/>
                  <Command
                      Command="10"
                      CmdAxes="8"
                      CmdPrm1="Axis3Voltage"
                      CmdPrm2="100000.0"/>
               </Step>
               <Transition>
                  <CheckCondition
                      Type="IF-THEN-ELSE"
                      Condition="MaxCurrPos = (PosTarREV - 0.1)"
                      True="Next"
                      False="OL_SyncREV"/>
               </Transition>
            </ProgramBlock>
            <ProgramBlock
                Type="STEP">
               <Comment
                   Comment="This command wil stop the axes at a certain position."/>
               <Step>
                  <Command
                      Command="36"
                      CmdAxes="15"
                      CmdPrm1="PosTarREV"
                      CmdPrm2="0.0"/>
               </Step>
               <Transition>
                  <CheckCondition
                      Type="IF-THEN"
                      Condition="_Axis[0].StatusBits.9 AND _Axis[1].StatusBits.9 AND _Axis[2].StatusBits.9 AND _Axis[3].StatusBits.9"
                      True="Next"/>
               </Transition>
            </ProgramBlock>
            <ProgramBlock
                Type="STEP">
               <Comment
                   Comment="This command is just so the In Position bit will turn on."/>
               <Step>
                  <Command
                      Command="5"
                      CmdAxes="15"/>
               </Step>
               <Transition>
                  <End/>
               </Transition>
            </ProgramBlock>
         </UserProgram>
      </UserProgramMgr>
   </Controller>
</Project>
