<?xml version="1.0" encoding="UTF-8"?>

<Project
    SWVersion="4.18.4"
    ProjectName="Project7"
    Author=""
    ProjDesc=""
    SecurityVersion="2">
   <Controller
       Type="RMC70"
       Name="Controller1"
       CommunicationPath="USB/73094197::DF1"
       SerNo="73094197"
       LoopTime="0.001"
       SelectedPlotSet="0">
      <Module
          PartNo="RMC75E"
          ModuleID="3"
          HardwareVer="1.4"
          FWRev="3.71.0C"
          FPGARev="2.11C"
          FLASHRev="7.2"
          FWBuildDT="February 3, 2021 (12:30 AM)"
          LdrRev="1.08"
          LdrBuildDT="June 22, 2011 (4:11 PM)"
          BoardRev="1.4B"
          EnetConfig="16#00000010"
          IPAddress="16#00000000"
          SubnetMask="16#00000000"
          DefGateway="16#00000000"
          McastTTL="1"
          McastAddrStart="16#00000000"
          McastAddrCount="0"
          ProAddr="16#00012000"
          ConAddr="16#00012020"
          EnetAppFlags="16#00000000"
          CustRec1000="0"
          CustRec1001="0"
          CustRec1002="0"
          CustRec1003="0"
          PNDevName=""
          EnetIpQos1="16#003B2F37"
          EnetIpQos2="16#2F2B1F1B"
          EnetIpAcdEnable="1"
          EncapInactTO="120"/>
      <Module
          PartNo="MA2"
          ModuleID="33"
          HardwareVer="1.2"/>
      <Module
          PartNo="AP2"
          ModuleID="64"
          HardwareVer="1.1"/>
      <Module
          PartNo="D8"
          ModuleID="66"
          HardwareVer="1.2"/>
      <Module
          PartNo="Q1"
          ModuleID="68"
          HardwareVer="1.0"/>
      <Axis
          AxisType="PosDifFrcCtl"
          InputType0="Pos"
          FeedbackType0.0="MDTSSI"
          FeedbackModule0.0="Axis1"
          FeedbackChannel0.0="0"
          InputType1="DifFrc"
          FeedbackType1.0="Analog"
          FeedbackModule1.0="Exp0"
          FeedbackChannel1.0="0"
          FeedbackType1.1="Analog"
          FeedbackModule1.1="Exp0"
          FeedbackChannel1.1="1"
          OutputType0="Analog"
          OutputModule0="Axis1"
          OutputChannel0="0"
          Name="Axis0"
          AxisNumber="0"
          AutoStopCfg1="16#00924020"
          AutoStopCfg2="16#00800000"
          AutoStopCfg3="16#00924924"
          HaltGroupNumber="0"
          PriInputBits="16#00000000"
          PositionScale="0.0004623465"
          ActualPositionCut-offFreq="0"
          PositionOffset="0"
          PriUnits="0"
          ActualVelocityCut-offFreq="100"
          ActualAccelCut-offFreq="25"
          NoiseErrorRate="1000"
          StopThreshold="0.1"
          SecUnits="0"
          PFFilterHz="0"
          dPFFilterHz="500"
          NoiseErrorRatePF="0"
          INSecFrcAScale="1250"
          INSecFrcAOffset="-15000"
          INSecFrcBScale="1250"
          INSecFrcBOffset="-15000"
          MDTConfig="16#00000000"
          SecAnaRange="16#00000001"
          OutputBits="16#00000000"
          OutputLimit="10"
          OutputBias="0"
          PriControlBits="16#00000001"
          AtSpeedTolerance="0.1"
          VelErrorTolerance="1"
          DefPVCtlMode="0"
          InPositionTolerance="0.05"
          PosErrorTolerance="0.25"
          OutputScale="10"
          DeadbandTolerance="0"
          OutputDeadband="0"
          ProportionalGain="137.44467"
          IntegralGain="2197.529"
          DifferentialGain="0"
          VelFFPos="3.3333333"
          VelFFNeg="3.3333333"
          AccelFeedForward="0.039788734"
          JerkFeedForward="0"
          AccCtlMode="0"
          PVOutputFilter="0"
          ModOrder="255"
          AtPFTolerance="10"
          PFErrorTolerance="100"
          PFProGain="0.006872234"
          PFIntGain="0.109876454"
          PFDifGain="0"
          PFGain="0.00016666666"
          dPFGain="1.9894367e-06"
          SecControlBits="16#00000000"
          PFOutputFilter="0"
          PrsFrcModelOrder="255"
          OpenLoopHaltRamp="100"
          PositiveTravelLimit="30"
          NegativeTravelLimit="0"
          ClosedLoopHaltDecel="10"
          ReqJerk="1e+05"
          PFPosLimit="10000"
          PFNegLimit="-10000"
          SimBits="16#00000005"
          SystemGain="3"
          NaturalFrequency="20"
          DampingFactor="0.75"
          SimPosPhysLim="29.5"
          SimNegPhysLim="0.5"
          SimDeadband="0"
          SimNullOffset="0"
          SimWeight="1000"
          SimMaxForce="10000"
          SimMaxComp="0.5">
         <TuningSetup>
            <TuningCommand
                Command="0"
                Param1=""
                Param2=""
                Param3=""
                Param4=""
                Param5=""
                Param6=""
                Param7=""
                Param8=""
                Param9=""
                BtnText=""
                CapturePlot="True"/>
            <TuningCommand
                Command="0"
                Param1=""
                Param2=""
                Param3=""
                Param4=""
                Param5=""
                Param6=""
                Param7=""
                Param8=""
                Param9=""
                BtnText=""
                CapturePlot="True"/>
            <TuningPlotCfg
                PlotCfgID="0"/>
            <TuningPlotCfg
                PlotCfgID="0"/>
            <TuningStatusMap
                NoRegisters="1"
                Register0="32776"/>
         </TuningSetup>
         <TuningSetup>
            <TuningCommand
                Command="0"
                Param1=""
                Param2=""
                Param3=""
                Param4=""
                Param5=""
                Param6=""
                Param7=""
                Param8=""
                Param9=""
                BtnText=""
                CapturePlot="True"/>
            <TuningCommand
                Command="0"
                Param1=""
                Param2=""
                Param3=""
                Param4=""
                Param5=""
                Param6=""
                Param7=""
                Param8=""
                Param9=""
                BtnText=""
                CapturePlot="True"/>
            <TuningPlotCfg
                PlotCfgID="0"/>
            <TuningPlotCfg
                PlotCfgID="0"/>
            <TuningStatusMap
                NoRegisters="3"
                Register0="32776"
                Register1="32828"
                Register2="32791"/>
         </TuningSetup>
      </Axis>
      <PlotSchema
          NoofPlots="3"
          NoofItems="8"
          Name="Plot Set 0">
         <Plot
             Name=""
             PlotCfgMode="1"
             NoofSamples="100000"
             SamplePeriodS="0.001"
             AssignedToAxis="0"
             TrendDurationS="10000"
             TriggerPercent="-1"
             TriggerType="16#00000101">
            <Item
                Address="%MD56.13"/>
            <Item
                Address="%MD8.53"/>
            <Item
                Address="%MD56.22"/>
            <Quantity
                Name="13 - (Yn)"
                Units=""
                Formula="%MD56.13"
                Filter="False"
                Type="REAL"
                DecPlaces="3"
                Graph="True"
                Pen="16#0000FF"
                AutoScale="True"
                AutoGroup="False"
                ScaleGroup="1"/>
            <Quantity
                Name="Axis0 Target Position"
                Units="pu"
                Formula="%MD8.53"
                Filter="False"
                Type="REAL"
                DecPlaces="3"
                Graph="True"
                Pen="16#E0E000"
                AutoScale="True"
                AutoGroup="False"
                ScaleGroup="1"/>
            <Quantity
                Name="22 - (FrequencyTest)"
                Units=""
                Formula="%MD56.22"
                Filter="False"
                Type="REAL"
                DecPlaces="3"
                Graph="True"
                Pen="16#000000"
                AutoScale="True"
                AutoGroup="True"/>
         </Plot>
         <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"
          RunProgInput="0"
          EnablePreScan="1"
          StopTasksOnHalt="16#00000001"
          StartupMode="0"/>
      <ShortcutKeySet
          Name="Set 0">
         <ShortcutKey
             Key="0"/>
         <ShortcutKey
             Key="1"/>
         <ShortcutKey
             Key="2"/>
         <ShortcutKey
             Key="3"/>
         <ShortcutKey
             Key="4"/>
         <ShortcutKey
             Key="5"/>
         <ShortcutKey
             Key="6"/>
         <ShortcutKey
             Key="7"/>
         <ShortcutKey
             Key="8"/>
         <ShortcutKey
             Key="9"/>
      </ShortcutKeySet>
      <Curves/>
      <IndirectDataMap/>
      <EventLogMgr>
         <ELogFilterController
             ControllerBits="16#00000007"/>
         <ELogFilterAxis
             AxisBits="16#0000000F"/>
         <ELogFilterAxis
             AxisBits="16#0000000F"/>
         <ELogFilterTask
             TaskBits="16#0000000F"/>
         <ELogFilterTask
             TaskBits="16#0000000F"/>
         <ELogFilterTask
             TaskBits="16#0000000F"/>
         <ELogFilterTask
             TaskBits="16#0000000F"/>
         <ELogFilterTask
             TaskBits="16#0000000F"/>
         <ELogFilterUSB
             USBBits="16#00000040"/>
         <ELogFilterEthernet
             EthernetBits="16#0000017C"/>
      </EventLogMgr>
      <RSLogixUDTInput
          CommCount="1"
          RMCName=""
          InLength1="0"
          InLength2="0"
          InLength3="0"
          OutLength1="0"
          OutLength2="0"
          OutLength3="0"/>
      <VariableTable>
         <Variable
             Offset="0"
             TagName="T"
             Format="REAL"
             DefaultValue="0.001"
             Description="Loop Time"/>
         <Variable
             Offset="1"
             TagName="Q"
             Format="REAL"
             DefaultValue="10"
             Description="Notch filter width, higher Q results in a narrower width"/>
         <Variable
             Offset="2"
             TagName="K"
             Format="REAL"
             DefaultValue="1"
             Description="select number of bi-quads"/>
         <Variable
             Offset="3"
             TagName="NotchCenter"
             Format="REAL"
             DefaultValue="10"
             Description="Select the center of the notch in Hz"/>
         <Variable
             Offset="4"
             TagName="C"
             Format="REAL"
             DefaultValue="63.6567"
             Description="= cot((W*T)/2)"/>
         <Variable
             Offset="5"
             TagName="W"
             Format="REAL"
             DefaultValue="31.4185"
             Description="= 2Pi * NotchCenter"/>
         <Variable
             Offset="6"
             TagName="A1"
             Format="REAL"
             DefaultValue="-1.995879"/>
         <Variable
             Offset="7"
             TagName="A2"
             Format="REAL"
             DefaultValue="0.996864"/>
         <Variable
             Offset="8"
             TagName="B0"
             Format="REAL"
             DefaultValue="0.998432"/>
         <Variable
             Offset="9"
             TagName="B1"
             Format="REAL"
             DefaultValue="-1.995879"/>
         <Variable
             Offset="10"
             TagName="B2"
             Format="REAL"
             DefaultValue="0.998432"/>
         <Variable
             Offset="11"
             TagName="Denom"
             Format="REAL"
             DefaultValue="0"/>
         <Variable
             Offset="13"
             TagName="Yn"
             Format="REAL"
             DefaultValue="0"/>
         <Variable
             Offset="14"
             TagName="Yn1"
             Format="REAL"
             DefaultValue="0"/>
         <Variable
             Offset="15"
             TagName="Yn2"
             Format="REAL"
             DefaultValue="0"/>
         <Variable
             Offset="16"
             TagName="Xn"
             Format="REAL"
             DefaultValue="0"/>
         <Variable
             Offset="17"
             TagName="Xn1"
             Format="REAL"
             DefaultValue="0"/>
         <Variable
             Offset="18"
             TagName="Xn2"
             Format="REAL"
             DefaultValue="0"/>
         <Variable
             Offset="22"
             TagName="FrequencyTest"
             Format="REAL"
             DefaultValue="0"/>
      </VariableTable>
      <DiscreteIO>
         <IOPoint
             PointNumber="0"
             Type="Input"/>
         <IOPoint
             PointNumber="1"
             Type="Input"/>
         <IOPoint
             PointNumber="2"
             Type="Input"/>
         <IOPoint
             PointNumber="3"
             Type="Input"/>
         <IOPoint
             PointNumber="4"
             Type="Input"/>
         <IOPoint
             PointNumber="5"
             Type="Input"/>
         <IOPoint
             PointNumber="6"
             Type="Input"/>
         <IOPoint
             PointNumber="7"
             Type="Input"/>
      </DiscreteIO>
      <UserProgramMgr
          EnableExprLogging="True"
          EnableICMDLogging="True"
          InitializeProgTriggers="False">
         <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"/>
         </UserProgram>
         <UserProgram
             Name="NotchFilter"
             Type="STEP"
             Number="1"
             Desc=""
             IncludeInBuild="True"
             SingleInstance="True"
             TaskMask="32767">
            <ProgramBlock
                Type="STEP">
               <Step>
                  <Expression
                      Src="Xn2 := Xn1; &#13;&#10;Xn1 := Xn; &#13;&#10;Xn := _Axis[0].TarPos;&#13;&#10;Yn2 := Yn1; &#13;&#10;Yn1 := Yn;&#13;&#10;&#13;&#10;W := 2.0*3.14159*NotchCenter;&#13;&#10;T := _LoopTime;&#13;&#10;C := (1.0/TAN((W*T/2.0)));&#13;&#10;&#13;&#10;Denom := ((C**2.0)*Q+Q+C);&#13;&#10;&#13;&#10;A1 := (-2.0*(C**2.0)*Q+2.0*Q)/Denom;&#13;&#10;&#13;&#10;A2 := (-C+(C**2.0)*Q+Q)/Denom;&#13;&#10;&#13;&#10;B0 := (Q*(1.0+C**2.0))/Denom;&#13;&#10;&#13;&#10;B1 := (Q*(2.0-2.0*C**2.0))/Denom;&#13;&#10;&#13;&#10;B2 := (Q*(1.0+C**2.0))/Denom;&#13;&#10;&#13;&#10;Yn := -(A1*Yn1) - (A2*Yn2) + (B0*Xn) + (B1*Xn1) + (B2*Xn2);"/>
               </Step>
               <Transition>
                  <Jump
                      Type="JUMP"
                      Next="Repeat"/>
               </Transition>
            </ProgramBlock>
         </UserProgram>
         <UserProgram
             Name="frequency"
             Type="STEP"
             Number="3"
             Desc=""
             IncludeInBuild="True"
             SingleInstance="True"
             TaskMask="32767">
            <ProgramBlock
                Type="STEP">
               <Step>
                  <Command
                      Command="56"
                      CmdAxes="1"
                      CmdPrm1="20.0"
                      CmdPrm2="100.0"
                      CmdPrm3="Seek (0)"
                      CmdPrm4="Nearest (0)"/>
                  <Expression
                      Src="FrequencyTest := 1.0;"/>
               </Step>
               <Transition>
                  <Jump
                      Type="NEXT"/>
               </Transition>
            </ProgramBlock>
            <ProgramBlock
                Type="STEP">
               <Step>
                  <Command
                      Command="20"
                      CmdAxes="1"
                      CmdPrm1="8.0"
                      CmdPrm2="10.0"
                      CmdPrm3="50.0"
                      CmdPrm4="50.0"
                      CmdPrm5="Nearest (0)"/>
               </Step>
               <Transition>
                  <CheckCondition
                      Type="IF-THEN"
                      Condition="_Axis[0].StatusBits.InPos"
                      True="Next"/>
               </Transition>
            </ProgramBlock>
            <ProgramBlock
                Type="STEP">
               <Step>
                  <Command
                      Command="72"
                      CmdAxes="1"
                      CmdPrm1="8.0"
                      CmdPrm2="0.1"
                      CmdPrm3="1.0"
                      CmdPrm4="0.0"
                      CmdPrm5="Auto (0)"
                      CmdPrm6="&lt;None&gt;"/>
               </Step>
               <Transition>
                  <Delay
                      Type="JUMP"
                      Duration="2.0"
                      Next="Next"/>
               </Transition>
            </ProgramBlock>
            <ProgramBlock
                Type="STEP"
                Label="ChangeTarget">
               <Step>
                  <Expression
                      Src="FrequencyTest := FrequencyTest+ 0.0005;"/>
                  <Command
                      Command="80"
                      CmdAxes="1"
                      CmdPrm1="Frequency (2)"
                      CmdPrm2="FrequencyTest"
                      CmdPrm3="Time (0)"
                      CmdPrm4="0.001"/>
               </Step>
               <Transition>
                  <Delay
                      Type="JUMP"
                      Duration="0.001"
                      Next="Next"/>
               </Transition>
            </ProgramBlock>
            <ProgramBlock
                Type="STEP">
               <Step/>
               <Transition>
                  <CheckCondition
                      Type="CASE-ELSE"
                      Condition="FrequencyTest &lt; 20.0"
                      True="ChangeTarget"
                      False="Next"/>
               </Transition>
            </ProgramBlock>
            <ProgramBlock
                Type="STEP">
               <Step>
                  <Command
                      Command="6"
                      CmdAxes="1"
                      CmdPrm1="100.0"/>
               </Step>
               <Transition>
                  <End/>
               </Transition>
            </ProgramBlock>
         </UserProgram>
      </UserProgramMgr>
      <UserFunctionMgr>
         <UserFunction
             ParentFolder="0"
             Expression="(*&#10;Insert Function Description Here&#13;&#10; &#32;FALSE is STC, &#32;TRUE is CTS *)&#10;&#10;FUNCTION Cartesian_TO_SCARA : BOOL&#13;&#10;&#9;&#9;VAR_INPUT&#13;&#10;&#9;&#9;&#9;CTS : BOOL ; (* &#32;FALSE is STC, &#32;TRUE is CTS *)&#13;&#10;&#9;&#9;END_VAR&#13;&#10;&#9;&#9;VAR_IN_OUT&#9;&#9;&#13;&#10;&#9;&#9;&#9;X : REAL ;&#13;&#10;&#9;&#9;&#9;Y : REAL ;&#13;&#10;&#9;&#9;&#9;Shoulder : REAL;&#13;&#10;&#9;&#9;&#9;Forearm : REAL;&#13;&#10;&#9;&#9;END_VAR&#13;&#10;&#9;&#9;VAR&#13;&#10;&#9;&#9;&#9;R1 : REAL := 10.0;&#13;&#10;&#9;&#9;&#9;R2 : REAL := 10.0;&#13;&#10;&#9;&#9;END_VAR&#13;&#10;&#10;&#9;&#9;&#9;IF(CTS) THEN&#13;&#10;&#9;&#9;&#9;&#9;&#9;Forearm := ACOS(( (X**2.0+Y**2.0)-(R1**2.0+R2**2.0))/(2.0*R1*R2)) ;&#13;&#10;&#9;&#9;&#9;&#9;&#9;Shoulder := ATAN(( (-R2*SIN(Forearm)*X)+(R1+R2*COS(Forearm)*Y))/((R2*SIN(Forearm)*Y)+(R1+R2*COS(Forearm)*X))) ;&#13;&#10;&#9;&#9;&#9;END_IF&#13;&#10;&#10;(* Insert Function body here *)&#10;&#10;&#9;Cartesian_TO_SCARA := FALSE;&#10;END_FUNCTION"/>
         <UserFunction
             ParentFolder="0"
             Expression="(*&#10;Insert Function Description Here&#13;&#10;*)&#10;&#10;FUNCTION InlineTest : REAL&#10;&#9;VAR_INPUT&#10;&#9;&#9;In1 : REAL;&#10;&#9;&#9;In2 : REAL; (* Insert Function body here *)&#10;&#9;END_VAR&#10;&#9;VAR_IN_OUT&#10;&#9;&#9;InOut1 : REAL; &#13;&#10;&#9;&#9;InOut2 : REAL;&#10;&#9;END_VAR&#10;&#10;(* Insert Function body here *)&#10;&#10;&#9;InlineTest := 0.0;&#10;&#10;END_FUNCTION"/>
      </UserFunctionMgr>
      <SecurityMgr
          SecurityFlags="16#00000000"
          Copyright=""
          Password=""
          SecurityGuid="{0322FA32-C8E5-4E2E-A518-8710B8A6038B}"/>
   </Controller>
</Project>
