Beckhoffcfg-device.xml 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <BeckhoffCfg>
  3. <Controller Name="MASTER" IPAddress="10.4.6.32.1.1" PortAddress="301">
  4. <!-- Need to have at least one input and one output before Axis stuff -->
  5. <!-- All inputs first, then all outputs -->
  6. <!--////////////////////////////////////////////////// ALL INPUTS START //////////////////////////////////////////////////-->
  7. <Input Name="PUF1.State" Address="Task 3.Inputs.PUF1.State" Type="Digital" DataType="bool"/>
  8. <Input Name="PUF1.ChuckAVac" Address="MAIN.ChuckAVac" Scaling="0=3276.7,-757=16383.5" Type="Analog" DataType="int"/>
  9. <Input Name="PUF1.ChuckBVac" Address="MAIN.ChuckBVac" Scaling="0=3276.7,-757=16383.5" Type="Analog" DataType="int"/>
  10. <Input Name="PUF1.DistanceSensor1" Address="MAIN.DistanceSensor1" Scaling="0=3276.7,-757=16383.5" Type="Analog" DataType="int"/>
  11. <Input Name="PUF1.DistanceSensor2" Address="MAIN.DistanceSensor2" Scaling="0=3276.7,-757=16383.5" Type="Analog" DataType="int"/>
  12. <Input Name="PUF2.ChuckAVac" Address="MAIN.ChuckAVac1" Scaling="0=3276.7,-757=16383.5" Type="Analog" DataType="int"/>
  13. <Input Name="PUF2.ChuckBVac" Address="MAIN.ChuckBVac1" Scaling="0=3276.7,-757=16383.5" Type="Analog" DataType="int"/>
  14. <Input Name="PUF2.DistanceSensor1" Address="MAIN.DistanceSensor3" Scaling="0=3276.7,-757=16383.5" Type="Analog" DataType="int"/>
  15. <Input Name="PUF2.DistanceSensor2" Address="MAIN.DistanceSensor4" Scaling="0=3276.7,-757=16383.5" Type="Analog" DataType="int"/>
  16. <!-- MAIN IO INPUTS END -->
  17. <!--////////////////////////////////////////////////// ALL INPUTS END //////////////////////////////////////////////////-->
  18. <!--////////////////////////////////////////////////// ALL OUTPUTS BEGIN //////////////////////////////////////////////////-->
  19. <Output Name="PUF1.ChuckARelease" Address="Task 3.Outputs.PUF1.ChuckARelease" Type="Digital" DataType="bool"/>
  20. <Output Name="PUF1.ChuckBRelease" Address="Task 3.Outputs.PUF1.ChuckBRelease" Type="Digital" DataType="bool"/>
  21. <Output Name="PUF2.ChuckARelease" Address="MAIN.ChuckARelease1" Type="Digital" DataType="bool"/>
  22. <Output Name="PUF2.ChuckBRelease" Address="MAIN.ChuckBRelease1" Type="Digital" DataType="bool"/>
  23. <Output Name="PUF2.Test" Address="Task 3.Outputs.Test" Type="Analog" Scaling="0=0,10=32767" DataType="int"/>
  24. <!--////////////////////////////////////////////////// ALL OUTPUTS END //////////////////////////////////////////////////-->
  25. <Axis Name="PUF1.Flip" MotorType="Copley" COEAddress="10.4.6.32.4.1" COEPort="1010" DebugLogging="false">
  26. <Input Address="Task 3.Inputs.PUF1.StatusWord" Type="StatusWord" DataType="uint"/>
  27. <Input Address="Task 3.Inputs.PUF1.ActualMotorPosition" Type="MotorPosition" DataType="dint"/>
  28. <Input Address="MAIN.PositionError" Type="PositionError" DataType="dint"/>
  29. <Input Address="MAIN.ActualVelocity" Type="ActualVelocity" DataType="dint"/>
  30. <Input Address="MAIN.ActualTorque" Type="ActualTorque" DataType="int"/>
  31. <Input Address="0x6098:00" Type="HomingMethod" DataType="byte"/>
  32. <Input Address="0x607C:00" Type="HomeOffset" DataType="dint"/>
  33. <Input Address="0x6099:01" Type="HomingVelocity" DataType="dint"/>
  34. <Input Address="0x6099:02" Type="HomingVelocitySlow" DataType="dint"/>
  35. <Input Address="0x609A:00" Type="HomingAccel" DataType="dint"/>
  36. <Output Address="Task 3.Outputs.PUF1.ControlWord" Type="ControlWord" DataType="uint"/>
  37. <Output Address="Task 3.Outputs.PUF1.ModeOfOperation" Type="ModeOfOperation" DataType="byte"/>
  38. <Output Address="Task 3.Outputs.PUF1.ProfileVelocity" Type="ProfileVelocity" DataType="dint"/>
  39. <Output Address="Task 3.Outputs.PUF1.ProfileAccel" Type="ProfileAccel" DataType="dint"/>
  40. <Output Address="Task 3.Outputs.PUF1.ProfileDecel" Type="ProfileDecel" DataType="dint"/>
  41. <Output Address="Task 3.Outputs.PUF1.TargetPosition" Type="TargetPosition" DataType="dint"/>
  42. <Output Address="0x6098:00" Type="HomingMethod" DataType="byte"/>
  43. <Output Address="0x607C:00" Type="HomeOffset" DataType="dint"/>
  44. <Output Address="0x6099:01" Type="HomingVelocity" DataType="dint"/>
  45. <Output Address="0x6099:02" Type="HomingVelocitySlow" DataType="dint"/>
  46. <Output Address="0x609A:00" Type="HomingAccel" DataType="dint"/>
  47. <MotorType>Servo</MotorType>
  48. <MotorDriveDirection>-1</MotorDriveDirection>
  49. <!-- +1 = Forward and -1 = Backward-->
  50. <EncoderFeedbackDirectionMValue>0</EncoderFeedbackDirectionMValue>
  51. <EncoderFeedbackDirectionNValue>0</EncoderFeedbackDirectionNValue>
  52. <ReverseLimitSwitchPolarity>1</ReverseLimitSwitchPolarity>
  53. <ForwardLimitSwitchPolarity>1</ForwardLimitSwitchPolarity>
  54. <HomeSwitchPolarity>-1</HomeSwitchPolarity>
  55. <HomingMethod>34</HomingMethod>
  56. <HomingOffset>0</HomingOffset>
  57. <HomingSpeedHomeSwitch>2500</HomingSpeedHomeSwitch>
  58. <HomingSpeedEncoderIndex>2500</HomingSpeedEncoderIndex>
  59. <HomingAccelDecel>420000</HomingAccelDecel>
  60. <HomingTimeOut>60000</HomingTimeOut>
  61. <ProportionalGain>15</ProportionalGain>
  62. <IntegralGain>1</IntegralGain>
  63. <DerivativeGain>30</DerivativeGain>
  64. <IntegralLimit>1</IntegralLimit>
  65. <ErrorLimit>4444</ErrorLimit>
  66. <VoltageOffset>0</VoltageOffset>
  67. <ReverseSoftwareLimit>-19134</ReverseSoftwareLimit>
  68. <ForwardSoftwareLimit>413645</ForwardSoftwareLimit>
  69. <Speed>529400</Speed>
  70. <Acceleration>84000</Acceleration>
  71. <Deceleration>84000</Deceleration>
  72. <Jerk>7200000</Jerk>
  73. <FeedforwardVelocity>0</FeedforwardVelocity>
  74. <FeedforwardAcceleration>0</FeedforwardAcceleration>
  75. <OffOnError>1</OffOnError>
  76. </Axis>
  77. <Axis Name="PUF1.Rotation" MotorType="Copley" COEAddress="169.254.167.184.2.1" COEPort="1007" DebugLogging="false">
  78. <Input Address="MAIN.StatusWord1" Type="StatusWord" DataType="uint"/>
  79. <Input Address="MAIN.ActualMotorPosition1" Type="MotorPosition" DataType="dint"/>
  80. <Input Address="MAIN.PositionError1" Type="PositionError" DataType="dint"/>
  81. <Input Address="MAIN.ActualVelocity1" Type="ActualVelocity" DataType="dint"/>
  82. <Input Address="MAIN.ActualTorque1" Type="ActualTorque" DataType="int"/>
  83. <Output Address="MAIN.ControlWord1" Type="ControlWord" DataType="uint"/>
  84. <Output Address="MAIN.ModeOfOperation1" Type="ModeOfOperation" DataType="byte"/>
  85. <Output Address="MAIN.ProfileVelocity1" Type="ProfileVelocity" DataType="dint"/>
  86. <Output Address="MAIN.ProfileAccel1" Type="ProfileAccel" DataType="dint"/>
  87. <Output Address="MAIN.ProfileDecel1" Type="ProfileDecel" DataType="dint"/>
  88. <Output Address="MAIN.TargetPosition1" Type="TargetPosition" DataType="dint"/>
  89. <MotorType>Servo</MotorType>
  90. <MotorDriveDirection>+1</MotorDriveDirection>
  91. <!-- MotorDriveDirection +1 = Forward and -1 = Backward-->
  92. <EncoderFeedbackDirectionMValue>0</EncoderFeedbackDirectionMValue>
  93. <EncoderFeedbackDirectionNValue>2</EncoderFeedbackDirectionNValue>
  94. <ReverseLimitSwitchPolarity>1</ReverseLimitSwitchPolarity>
  95. <ForwardLimitSwitchPolarity>1</ForwardLimitSwitchPolarity>
  96. <HomeSwitchPolarity>-1</HomeSwitchPolarity>
  97. <HomingMethod>3</HomingMethod>
  98. <HomingOffset>0</HomingOffset>
  99. <!--HomingOffset>0</HomingOffset-->
  100. <!-- clear bit 9 so motor does not move to zero after home -->
  101. <!-- HomeConfig>34</HomeConfig -->
  102. <HomingSpeedHomeSwitch>0</HomingSpeedHomeSwitch>
  103. <HomingSpeedEncoderIndex>0</HomingSpeedEncoderIndex>
  104. <HomingAccelDecel>0</HomingAccelDecel>
  105. <HomingTimeOut>60000</HomingTimeOut>
  106. <ProportionalGain>14</ProportionalGain>
  107. <IntegralGain>1</IntegralGain>
  108. <DerivativeGain>40</DerivativeGain>
  109. <IntegralLimit>1</IntegralLimit>
  110. <ErrorLimit>11110</ErrorLimit>
  111. <VoltageOffset>0</VoltageOffset>
  112. <ReverseSoftwareLimit>-60556</ReverseSoftwareLimit>
  113. <ForwardSoftwareLimit>29712</ForwardSoftwareLimit>
  114. <Speed>444444</Speed>
  115. <Acceleration>3333333</Acceleration>
  116. <Deceleration>3333333</Deceleration>
  117. <Jerk>7200000</Jerk>
  118. <FeedforwardVelocity>0</FeedforwardVelocity>
  119. <FeedforwardAcceleration>0</FeedforwardAcceleration>
  120. <OffOnError>1</OffOnError>
  121. </Axis>
  122. <Axis Name="PUF1.Vertical" MotorType="Copley" COEAddress="169.254.167.184.2.1" COEPort="1007" DebugLogging="false">
  123. <Input Address="MAIN.StatusWord2" Type="StatusWord" DataType="uint"/>
  124. <Input Address="MAIN.ActualMotorPosition2" Type="MotorPosition" DataType="dint"/>
  125. <Input Address="MAIN.PositionError2" Type="PositionError" DataType="dint"/>
  126. <Input Address="MAIN.ActualVelocity2" Type="ActualVelocity" DataType="dint"/>
  127. <Input Address="MAIN.ActualTorque2" Type="ActualTorque" DataType="int"/>
  128. <Output Address="MAIN.ControlWord2" Type="ControlWord" DataType="uint"/>
  129. <Output Address="MAIN.ModeOfOperation2" Type="ModeOfOperation" DataType="byte"/>
  130. <Output Address="MAIN.ProfileVelocity2" Type="ProfileVelocity" DataType="dint"/>
  131. <Output Address="MAIN.ProfileAccel2" Type="ProfileAccel" DataType="dint"/>
  132. <Output Address="MAIN.ProfileDecel2" Type="ProfileDecel" DataType="dint"/>
  133. <Output Address="MAIN.TargetPosition2" Type="TargetPosition" DataType="dint"/>
  134. <MotorType>Servo</MotorType>
  135. <MotorDriveDirection>+1</MotorDriveDirection>
  136. <!-- MotorDriveDirection +1 = Forward and -1 = Backward-->
  137. <EncoderFeedbackDirectionMValue>0</EncoderFeedbackDirectionMValue>
  138. <EncoderFeedbackDirectionNValue>2</EncoderFeedbackDirectionNValue>
  139. <ReverseLimitSwitchPolarity>1</ReverseLimitSwitchPolarity>
  140. <ForwardLimitSwitchPolarity>1</ForwardLimitSwitchPolarity>
  141. <HomeSwitchPolarity>-1</HomeSwitchPolarity>
  142. <HomingMethod>7</HomingMethod>
  143. <HomingOffset>0</HomingOffset>
  144. <!--HomingOffset>0</HomingOffset-->
  145. <HomingSpeedHomeSwitch>5242850</HomingSpeedHomeSwitch>
  146. <HomingSpeedEncoderIndex>1000000</HomingSpeedEncoderIndex>
  147. <HomingAccelDecel>26214250</HomingAccelDecel>
  148. <HomingTimeOut>60000</HomingTimeOut>
  149. <ProportionalGain>14</ProportionalGain>
  150. <IntegralGain>1</IntegralGain>
  151. <DerivativeGain>40</DerivativeGain>
  152. <IntegralLimit>1</IntegralLimit>
  153. <ErrorLimit>52428</ErrorLimit>
  154. <VoltageOffset>0</VoltageOffset>
  155. <ReverseSoftwareLimit>-31142708</ReverseSoftwareLimit>
  156. <ForwardSoftwareLimit>1048576</ForwardSoftwareLimit>
  157. <Speed>52428800</Speed>
  158. <Acceleration>262144000</Acceleration>
  159. <Deceleration>262144000</Deceleration>
  160. <FeedforwardVelocity>0</FeedforwardVelocity>
  161. <FeedforwardAcceleration>0</FeedforwardAcceleration>
  162. <OffOnError>1</OffOnError>
  163. <NegativeTorqueLimit>35</NegativeTorqueLimit>
  164. <PositiveTorqueLimit>75</PositiveTorqueLimit>
  165. </Axis>
  166. <Axis Name="PUF2.Flip" MotorType="Copley" COEAddress="169.254.167.184.2.1" COEPort="1007" DebugLogging="false">
  167. <Input Address="MAIN.StatusWord1" Type="StatusWord" DataType="uint"/>
  168. <Input Address="MAIN.ActualMotorPosition1" Type="MotorPosition" DataType="dint"/>
  169. <Input Address="MAIN.PositionError1" Type="PositionError" DataType="dint"/>
  170. <Input Address="MAIN.ActualVelocity1" Type="ActualVelocity" DataType="dint"/>
  171. <Input Address="MAIN.ActualTorque1" Type="ActualTorque" DataType="int"/>
  172. <Input Address="MAIN.TargetPosition1" Type="TargetPosition" DataType="dint"/>
  173. <Output Address="MAIN.ControlWord1" Type="ControlWord" DataType="uint"/>
  174. <Output Address="MAIN.ModeOfOperation1" Type="ModeOfOperation" DataType="byte"/>
  175. <Output Address="MAIN.ProfileVelocity1" Type="ProfileVelocity" DataType="dint"/>
  176. <Output Address="MAIN.ProfileAccel1" Type="ProfileAccel" DataType="dint"/>
  177. <Output Address="MAIN.ProfileDecel1" Type="ProfileDecel" DataType="dint"/>
  178. <MotorType>Servo</MotorType>
  179. <MotorDriveDirection>+1</MotorDriveDirection>
  180. <!-- MotorDriveDirection +1 = Forward and -1 = Backward-->
  181. <EncoderFeedbackDirectionMValue>0</EncoderFeedbackDirectionMValue>
  182. <EncoderFeedbackDirectionNValue>2</EncoderFeedbackDirectionNValue>
  183. <ReverseLimitSwitchPolarity>1</ReverseLimitSwitchPolarity>
  184. <ForwardLimitSwitchPolarity>1</ForwardLimitSwitchPolarity>
  185. <HomeSwitchPolarity>-1</HomeSwitchPolarity>
  186. <HomingMethod>3</HomingMethod>
  187. <HomingOffset>0</HomingOffset>
  188. <!--HomingOffset>0</HomingOffset-->
  189. <!-- clear bit 9 so motor does not move to zero after home -->
  190. <!-- HomeConfig>34</HomeConfig -->
  191. <HomingSpeedHomeSwitch>0</HomingSpeedHomeSwitch>
  192. <HomingSpeedEncoderIndex>0</HomingSpeedEncoderIndex>
  193. <HomingAccelDecel>0</HomingAccelDecel>
  194. <HomingTimeOut>60000</HomingTimeOut>
  195. <ProportionalGain>14</ProportionalGain>
  196. <IntegralGain>1</IntegralGain>
  197. <DerivativeGain>40</DerivativeGain>
  198. <IntegralLimit>1</IntegralLimit>
  199. <ErrorLimit>11110</ErrorLimit>
  200. <VoltageOffset>0</VoltageOffset>
  201. <ReverseSoftwareLimit>-60556</ReverseSoftwareLimit>
  202. <ForwardSoftwareLimit>29712</ForwardSoftwareLimit>
  203. <Speed>444444</Speed>
  204. <Acceleration>3333333</Acceleration>
  205. <Deceleration>3333333</Deceleration>
  206. <Jerk>7200000</Jerk>
  207. <FeedforwardVelocity>0</FeedforwardVelocity>
  208. <FeedforwardAcceleration>0</FeedforwardAcceleration>
  209. <OffOnError>1</OffOnError>
  210. </Axis>
  211. <!-- SRD AXES BEGIN -->
  212. <!-- Maxon EPOS2 -->
  213. <!-- position is in counts, speed is in rpm: counts/sec * 60 sec/min / (512 * 4 counts/rev) = 0.0293 rev/min (rpm) -->
  214. <Axis Name="SRD1.Arm" MotorType="Maxon" SpeedConversion="0.0293" COEAddress="169.254.167.184.3.1" COEPort="4097" DebugLogging="false">
  215. <Input Address="Task 3.Inputs.r_SRD1_ARM_StatusWord" Type="StatusWord" DataType="uint"/>
  216. <!--DigitalInputs may be used someday in PDO instead of ModeOfOperationDisplay/-->
  217. <!--Input Address="Task 3.Inputs.r_SRD1_ARM_DigitalInputs" Type="DigitalInputs" DataType="uint"/-->
  218. <Input Address="Task 3.Inputs.r_SRD1_ARM_ModeOfOperationDisplay" Type="ModeOfOperation" DataType="sint"/>
  219. <Input Address="Task 3.Inputs.r_SRD1_ARM_ActualMotorPosition" Type="MotorPosition" DataType="dint"/>
  220. <Input Address="Task 3.Outputs.c_SRD1_ARM_ControlWord" Type="ControlWord" DataType="uint"/>
  221. <Input Address="Task 3.Outputs.c_SRD1_ARM_TargetPosition" Type="TargetPosition" DataType="dint"/>
  222. <Input Address="0x6081:00" Type="ProfileVelocity" DataType="dint"/>
  223. <Input Address="0x6083:00" Type="ProfileAccel" DataType="dint"/>
  224. <Input Address="0x6084:00" Type="ProfileDecel" DataType="dint"/>
  225. <Input Address="0x607D:01" Type="SoftwareLimitMinus" DataType="dint"/>
  226. <Input Address="0x607D:02" Type="SoftwareLimitPlus" DataType="dint"/>
  227. <Input Address="0x6098:00" Type="HomingMethod" DataType="byte"/>
  228. <Input Address="0x607C:00" Type="HomeOffset" DataType="dint"/>
  229. <Input Address="0x6099:01" Type="HomingVelocity" DataType="dint"/>
  230. <Input Address="0x6099:02" Type="HomingVelocitySlow" DataType="dint"/>
  231. <Input Address="0x609A:00" Type="HomingAccel" DataType="dint"/>
  232. <Input Address="0x6410:02" Type="PeakCurrentLimit" DataType="uint"/>
  233. <Input Address="0x6410:01" Type="ContinuousCurrentLimit" DataType="uint"/>
  234. <Input Address="0x6085:00" Type="EStopDecel" DataType="udint"/>
  235. <Input Address="0x607F:00" Type="VelocityLimit" DataType="udint"/>
  236. <Input Address="0x60C5:00" Type="AccelerationLimit" DataType="udint"/>
  237. <Input Address="0x2082:00" Type="HomeAdjustment" DataType="dint"/>
  238. <Input Address="0x1001:00" Type="ErrorRegister" DataType="usint"/>
  239. <Input Address="0x1003:00" Type="ErrorHistoryCount" DataType="usint"/>
  240. <Input Address="0x1003:01" Type="ErrorHistory1" DataType="udint"/>
  241. <!--Input Address="0x1003:02" Type="ErrorHistory2" DataType="udint"/>
  242. <Input Address="0x1003:03" Type="ErrorHistory3" DataType="udint"/>
  243. <Input Address="0x1003:04" Type="ErrorHistory4" DataType="udint"/>
  244. <Input Address="0x1003:05" Type="ErrorHistory5" DataType="udint"/-->
  245. <Output Address="Task 3.Outputs.c_SRD1_ARM_ControlWord" Type="ControlWord" DataType="uint"/>
  246. <Output Address="Task 3.Outputs.c_SRD1_ARM_ModeOfOperation" Type="ModeOfOperation" DataType="sint"/>
  247. <Output Address="Task 3.Outputs.c_SRD1_ARM_TargetPosition" Type="TargetPosition" DataType="dint"/>
  248. <Output Address="0x6081:00" Type="ProfileVelocity" DataType="dint"/>
  249. <Output Address="0x6083:00" Type="ProfileAccel" DataType="dint"/>
  250. <Output Address="0x6084:00" Type="ProfileDecel" DataType="dint"/>
  251. <Output Address="0x607D:01" Type="SoftwareLimitMinus" DataType="dint"/>
  252. <Output Address="0x607D:02" Type="SoftwareLimitPlus" DataType="dint"/>
  253. <Output Address="0x6098:00" Type="HomingMethod" DataType="byte"/>
  254. <Output Address="0x607C:00" Type="HomeOffset" DataType="dint"/>
  255. <Output Address="0x6099:01" Type="HomingVelocity" DataType="dint"/>
  256. <Output Address="0x6099:02" Type="HomingVelocitySlow" DataType="dint"/>
  257. <Output Address="0x609A:00" Type="HomingAccel" DataType="dint"/>
  258. <Output Address="0x6410:02" Type="PeakCurrentLimit" DataType="uint"/>
  259. <Output Address="0x6410:01" Type="ContinuousCurrentLimit" DataType="uint"/>
  260. <!--MiscConfig may be used someday if want to reverse direction of motion/-->
  261. <!--Output Address="0x2008:00" Type="MiscConfig" DataType="uint"/-->
  262. <!-- 2184.533333 counts/degree -->
  263. <MotorType>Servo</MotorType>
  264. <MotorDriveDirection>-1</MotorDriveDirection>
  265. <!-- +1 = Forward and -1 = Backward-->
  266. <EncoderFeedbackDirectionMValue>0</EncoderFeedbackDirectionMValue>
  267. <EncoderFeedbackDirectionNValue>0</EncoderFeedbackDirectionNValue>
  268. <ReverseLimitSwitchPolarity>1</ReverseLimitSwitchPolarity>
  269. <ForwardLimitSwitchPolarity>1</ForwardLimitSwitchPolarity>
  270. <HomeSwitchPolarity>-1</HomeSwitchPolarity>
  271. <!-- Negative to Home Switch -->
  272. <!--HomingMethod>21</HomingMethod-->
  273. <!-- Positive to Home Switch -->
  274. <HomingMethod>23</HomingMethod>
  275. <HomingOffset>0</HomingOffset>
  276. <HomingSpeedHomeSwitch>200</HomingSpeedHomeSwitch>
  277. <HomingSpeedEncoderIndex>50</HomingSpeedEncoderIndex>
  278. <HomingAccelDecel>5000</HomingAccelDecel>
  279. <HomingTimeOut>25000</HomingTimeOut>
  280. <ProportionalGain>0</ProportionalGain>
  281. <IntegralGain>0</IntegralGain>
  282. <DerivativeGain>0</DerivativeGain>
  283. <IntegralLimit>0</IntegralLimit>
  284. <ErrorLimit>200</ErrorLimit>
  285. <VoltageOffset>0</VoltageOffset>
  286. <ReverseSoftwareLimit>-10000000</ReverseSoftwareLimit>
  287. <ForwardSoftwareLimit>10000000</ForwardSoftwareLimit>
  288. <Speed>1000</Speed>
  289. <Acceleration>5000</Acceleration>
  290. <Deceleration>5000</Deceleration>
  291. <FeedforwardVelocity>0</FeedforwardVelocity>
  292. <FeedforwardAcceleration>0</FeedforwardAcceleration>
  293. <OffOnError>1</OffOnError>
  294. </Axis>
  295. <!-- Copley XE2 2-Axis -->
  296. <Axis Name="SRD1.Rotation" MotorType="Copley" COEAddress="169.254.167.184.2.1" COEPort="1057" DebugLogging="false">
  297. <Input Address="Task 3.Inputs.r_SRD1_ROTATION_StatusWord" Type="StatusWord" DataType="uint"/>
  298. <Input Address="Task 3.Inputs.r_SRD1_ROTATION_ManufStatus" Type="ManufStatus" DataType="udint"/>
  299. <Input Address="Task 3.Inputs.r_SRD1_ROTATION_ProfileStatus" Type="ProfileStatus" DataType="int"/>
  300. <Input Address="Task 3.Inputs.r_SRD1_ROTATION_ModeOfOperationDisplay" Type="ModeOfOperation" DataType="sint"/>
  301. <Input Address="Task 3.Inputs.r_SRD1_ROTATION_ActualMotorPosition" Type="MotorPosition" DataType="dint"/>
  302. <Input Address="Task 3.Inputs.r_SRD1_ROTATION_ActualFollowingError" Type="PositionError" DataType="dint"/>
  303. <Input Address="Task 3.Inputs.r_SRD1_ROTATION_ActualVelocity" Type="ActualVelocity" DataType="dint"/>
  304. <Input Address="Task 3.Inputs.r_SRD1_ROTATION_ActualTorque" Type="ActualTorque" DataType="short"/>
  305. <Input Address="Task 3.Outputs.c_SRD1_ROTATION_ControlWord" Type="ControlWord" DataType="uint"/>
  306. <Input Address="Task 3.Outputs.c_SRD1_ROTATION_TargetPosition" Type="TargetPosition" DataType="dint"/>
  307. <Input Address="Task 3.Outputs.c_SRD1_ROTATION_ProfileVelocity" Type="ProfileVelocity" DataType="dint"/>
  308. <Input Address="Task 3.Outputs.c_SRD1_ROTATION_ProfileAccel" Type="ProfileAccel" DataType="dint"/>
  309. <Input Address="Task 3.Outputs.c_SRD1_ROTATION_ProfileDecel" Type="ProfileDecel" DataType="dint"/>
  310. <Input Address="0x2253:00" Type="SoftwareLimitDecel" DataType="udint"/>
  311. <Input Address="0x607D:01" Type="SoftwareLimitMinus" DataType="dint"/>
  312. <Input Address="0x607D:02" Type="SoftwareLimitPlus" DataType="dint"/>
  313. <Input Address="0x6098:00" Type="HomingMethod" DataType="byte"/>
  314. <Input Address="0x607C:00" Type="HomeOffset" DataType="dint"/>
  315. <Input Address="0x6099:01" Type="HomingVelocity" DataType="dint"/>
  316. <Input Address="0x6099:02" Type="HomingVelocitySlow" DataType="dint"/>
  317. <Input Address="0x609A:00" Type="HomingAccel" DataType="dint"/>
  318. <Input Address="0x2353:00" Type="HomeAdjustment" DataType="dint"/>
  319. <Input Address="0x2110:00" Type="PeakCurrentLimit" DataType="int"/>
  320. <Input Address="0x2111:00" Type="ContinuousCurrentLimit" DataType="int"/>
  321. <Input Address="0x6085:00" Type="EStopDecel" DataType="udint"/>
  322. <Input Address="0x2103:00" Type="VelocityLimit" DataType="udint"/>
  323. <Input Address="0x6067:00" Type="PositionWindow" DataType="udint"/>
  324. <Input Address="0x2120:00" Type="FollowingErrorWindow" DataType="udint"/>
  325. <Output Address="Task 3.Outputs.c_SRD1_ROTATION_ControlWord" Type="ControlWord" DataType="uint"/>
  326. <Output Address="Task 3.Outputs.c_SRD1_ROTATION_ModeOfOperation" Type="ModeOfOperation" DataType="sint"/>
  327. <Output Address="Task 3.Outputs.c_SRD1_ROTATION_TargetPosition" Type="TargetPosition" DataType="dint"/>
  328. <Output Address="Task 3.Outputs.c_SRD1_ROTATION_ProfileVelocity" Type="ProfileVelocity" DataType="dint"/>
  329. <Output Address="Task 3.Outputs.c_SRD1_ROTATION_ProfileAccel" Type="ProfileAccel" DataType="dint"/>
  330. <Output Address="Task 3.Outputs.c_SRD1_ROTATION_ProfileDecel" Type="ProfileDecel" DataType="dint"/>
  331. <Output Address="0x2253:00" Type="SoftwareLimitDecel" DataType="udint"/>
  332. <Output Address="0x607D:01" Type="SoftwareLimitMinus" DataType="dint"/>
  333. <Output Address="0x607D:02" Type="SoftwareLimitPlus" DataType="dint"/>
  334. <Output Address="0x6098:00" Type="HomingMethod" DataType="byte"/>
  335. <Output Address="0x607C:00" Type="HomeOffset" DataType="dint"/>
  336. <Output Address="0x6099:01" Type="HomingVelocity" DataType="dint"/>
  337. <Output Address="0x6099:02" Type="HomingVelocitySlow" DataType="dint"/>
  338. <Output Address="0x609A:00" Type="HomingAccel" DataType="dint"/>
  339. <!-- 58.822222 counts/deg -->
  340. <MotorType>Servo</MotorType>
  341. <MotorDriveDirection>-1</MotorDriveDirection>
  342. <!-- +1 = Forward and -1 = Backward-->
  343. <EncoderFeedbackDirectionMValue>0</EncoderFeedbackDirectionMValue>
  344. <EncoderFeedbackDirectionNValue>0</EncoderFeedbackDirectionNValue>
  345. <ReverseLimitSwitchPolarity>1</ReverseLimitSwitchPolarity>
  346. <ForwardLimitSwitchPolarity>1</ForwardLimitSwitchPolarity>
  347. <HomeSwitchPolarity>-1</HomeSwitchPolarity>
  348. <!-- Positive to Index -->
  349. <HomingMethod>34</HomingMethod>
  350. <HomingOffset>0</HomingOffset>
  351. <HomingSpeedHomeSwitch>2500</HomingSpeedHomeSwitch>
  352. <HomingSpeedEncoderIndex>2500</HomingSpeedEncoderIndex>
  353. <HomingAccelDecel>420000</HomingAccelDecel>
  354. <HomingTimeOut>15000</HomingTimeOut>
  355. <ProportionalGain>0</ProportionalGain>
  356. <IntegralGain>0</IntegralGain>
  357. <DerivativeGain>0</DerivativeGain>
  358. <IntegralLimit>0</IntegralLimit>
  359. <ErrorLimit>2000</ErrorLimit>
  360. <VoltageOffset>0</VoltageOffset>
  361. <ReverseSoftwareLimit>0</ReverseSoftwareLimit>
  362. <ForwardSoftwareLimit>0</ForwardSoftwareLimit>
  363. <Speed>529400</Speed>
  364. <Acceleration>84000</Acceleration>
  365. <Deceleration>84000</Deceleration>
  366. <FeedforwardVelocity>0</FeedforwardVelocity>
  367. <FeedforwardAcceleration>0</FeedforwardAcceleration>
  368. <OffOnError>1</OffOnError>
  369. </Axis>
  370. <!-- Maxon EPOS2 -->
  371. <!-- position is in counts, speed is in rpm: counts/sec * 60 sec/min / (512 * 4 counts/rev) = 0.0293 rev/min (rpm) -->
  372. <Axis Name="SRD2.Arm" MotorType="Maxon" SpeedConversion="0.0293" COEAddress="169.254.167.184.3.1" COEPort="4098" DebugLogging="false">
  373. <Input Address="Task 3.Inputs.r_SRD2_ARM_StatusWord" Type="StatusWord" DataType="uint"/>
  374. <!--DigitalInputs may be used someday in PDO instead of ModeOfOperationDisplay/-->
  375. <!--Input Address="Task 3.Inputs.r_SRD2_ARM_DigitalInputs" Type="DigitalInputs" DataType="uint"/-->
  376. <Input Address="Task 3.Inputs.r_SRD2_ARM_ModeOfOperationDisplay" Type="ModeOfOperation" DataType="sint"/>
  377. <Input Address="Task 3.Inputs.r_SRD2_ARM_ActualMotorPosition" Type="MotorPosition" DataType="dint"/>
  378. <Input Address="Task 3.Outputs.c_SRD2_ARM_ControlWord" Type="ControlWord" DataType="uint"/>
  379. <Input Address="Task 3.Outputs.c_SRD2_ARM_TargetPosition" Type="TargetPosition" DataType="dint"/>
  380. <Input Address="0x6081:00" Type="ProfileVelocity" DataType="dint"/>
  381. <Input Address="0x6083:00" Type="ProfileAccel" DataType="dint"/>
  382. <Input Address="0x6084:00" Type="ProfileDecel" DataType="dint"/>
  383. <Input Address="0x607D:01" Type="SoftwareLimitMinus" DataType="dint"/>
  384. <Input Address="0x607D:02" Type="SoftwareLimitPlus" DataType="dint"/>
  385. <Input Address="0x6098:00" Type="HomingMethod" DataType="byte"/>
  386. <Input Address="0x607C:00" Type="HomeOffset" DataType="dint"/>
  387. <Input Address="0x6099:01" Type="HomingVelocity" DataType="dint"/>
  388. <Input Address="0x6099:02" Type="HomingVelocitySlow" DataType="dint"/>
  389. <Input Address="0x609A:00" Type="HomingAccel" DataType="dint"/>
  390. <Input Address="0x6410:02" Type="PeakCurrentLimit" DataType="uint"/>
  391. <Input Address="0x6410:01" Type="ContinuousCurrentLimit" DataType="uint"/>
  392. <Input Address="0x6085:00" Type="EStopDecel" DataType="udint"/>
  393. <Input Address="0x607F:00" Type="VelocityLimit" DataType="udint"/>
  394. <Input Address="0x60C5:00" Type="AccelerationLimit" DataType="udint"/>
  395. <Input Address="0x2082:00" Type="HomeAdjustment" DataType="dint"/>
  396. <Input Address="0x1001:00" Type="ErrorRegister" DataType="usint"/>
  397. <Input Address="0x1003:00" Type="ErrorHistoryCount" DataType="usint"/>
  398. <Input Address="0x1003:01" Type="ErrorHistory1" DataType="udint"/>
  399. <!--Input Address="0x1003:02" Type="ErrorHistory2" DataType="udint"/>
  400. <Input Address="0x1003:03" Type="ErrorHistory3" DataType="udint"/>
  401. <Input Address="0x1003:04" Type="ErrorHistory4" DataType="udint"/>
  402. <Input Address="0x1003:05" Type="ErrorHistory5" DataType="udint"/-->
  403. <Output Address="Task 3.Outputs.c_SRD2_ARM_ControlWord" Type="ControlWord" DataType="uint"/>
  404. <Output Address="Task 3.Outputs.c_SRD2_ARM_ModeOfOperation" Type="ModeOfOperation" DataType="sint"/>
  405. <Output Address="Task 3.Outputs.c_SRD2_ARM_TargetPosition" Type="TargetPosition" DataType="dint"/>
  406. <Output Address="0x6081:00" Type="ProfileVelocity" DataType="dint"/>
  407. <Output Address="0x6083:00" Type="ProfileAccel" DataType="dint"/>
  408. <Output Address="0x6084:00" Type="ProfileDecel" DataType="dint"/>
  409. <Output Address="0x607D:01" Type="SoftwareLimitMinus" DataType="dint"/>
  410. <Output Address="0x607D:02" Type="SoftwareLimitPlus" DataType="dint"/>
  411. <Output Address="0x6098:00" Type="HomingMethod" DataType="byte"/>
  412. <Output Address="0x607C:00" Type="HomeOffset" DataType="dint"/>
  413. <Output Address="0x6099:01" Type="HomingVelocity" DataType="dint"/>
  414. <Output Address="0x6099:02" Type="HomingVelocitySlow" DataType="dint"/>
  415. <Output Address="0x609A:00" Type="HomingAccel" DataType="dint"/>
  416. <Output Address="0x6410:02" Type="PeakCurrentLimit" DataType="uint"/>
  417. <Output Address="0x6410:01" Type="ContinuousCurrentLimit" DataType="uint"/>
  418. <!--MiscConfig may be used someday if want to reverse direction of motion/-->
  419. <!--Output Address="0x2008:00" Type="MiscConfig" DataType="uint"/-->
  420. <!-- 2184.533333 counts/degree -->
  421. <MotorType>Servo</MotorType>
  422. <MotorDriveDirection>-1</MotorDriveDirection>
  423. <!-- +1 = Forward and -1 = Backward-->
  424. <EncoderFeedbackDirectionMValue>0</EncoderFeedbackDirectionMValue>
  425. <EncoderFeedbackDirectionNValue>0</EncoderFeedbackDirectionNValue>
  426. <ReverseLimitSwitchPolarity>1</ReverseLimitSwitchPolarity>
  427. <ForwardLimitSwitchPolarity>1</ForwardLimitSwitchPolarity>
  428. <HomeSwitchPolarity>-1</HomeSwitchPolarity>
  429. <!-- Negative to Home Switch -->
  430. <!--HomingMethod>21</HomingMethod-->
  431. <!-- Positive to Home Switch -->
  432. <HomingMethod>23</HomingMethod>
  433. <HomingOffset>0</HomingOffset>
  434. <HomingSpeedHomeSwitch>200</HomingSpeedHomeSwitch>
  435. <HomingSpeedEncoderIndex>50</HomingSpeedEncoderIndex>
  436. <HomingAccelDecel>5000</HomingAccelDecel>
  437. <HomingTimeOut>25000</HomingTimeOut>
  438. <ProportionalGain>0</ProportionalGain>
  439. <IntegralGain>0</IntegralGain>
  440. <DerivativeGain>0</DerivativeGain>
  441. <IntegralLimit>0</IntegralLimit>
  442. <ErrorLimit>200</ErrorLimit>
  443. <VoltageOffset>0</VoltageOffset>
  444. <ReverseSoftwareLimit>-10000000</ReverseSoftwareLimit>
  445. <ForwardSoftwareLimit>10000000</ForwardSoftwareLimit>
  446. <Speed>1000</Speed>
  447. <Acceleration>5000</Acceleration>
  448. <Deceleration>5000</Deceleration>
  449. <FeedforwardVelocity>0</FeedforwardVelocity>
  450. <FeedforwardAcceleration>0</FeedforwardAcceleration>
  451. <OffOnError>1</OffOnError>
  452. </Axis>
  453. <!-- Copley XE2 2-Axis -->
  454. <Axis Name="SRD2.Rotation" MotorType="Copley" COEAddress="169.254.167.184.2.1" COEPort="1057" DebugLogging="false">
  455. <Input Address="Task 3.Inputs.r_SRD2_ROTATION_StatusWord" Type="StatusWord" DataType="uint"/>
  456. <Input Address="Task 3.Inputs.r_SRD2_ROTATION_ManufStatus" Type="ManufStatus" DataType="udint"/>
  457. <Input Address="Task 3.Inputs.r_SRD2_ROTATION_ProfileStatus" Type="ProfileStatus" DataType="int"/>
  458. <Input Address="Task 3.Inputs.r_SRD2_ROTATION_ModeOfOperationDisplay" Type="ModeOfOperation" DataType="sint"/>
  459. <Input Address="Task 3.Inputs.r_SRD2_ROTATION_ActualMotorPosition" Type="MotorPosition" DataType="dint"/>
  460. <Input Address="Task 3.Inputs.r_SRD2_ROTATION_ActualFollowingError" Type="PositionError" DataType="dint"/>
  461. <Input Address="Task 3.Inputs.r_SRD2_ROTATION_ActualVelocity" Type="ActualVelocity" DataType="dint"/>
  462. <Input Address="Task 3.Inputs.r_SRD2_ROTATION_ActualTorque" Type="ActualTorque" DataType="short"/>
  463. <Input Address="Task 3.Outputs.c_SRD2_ROTATION_ControlWord" Type="ControlWord" DataType="uint"/>
  464. <Input Address="Task 3.Outputs.c_SRD2_ROTATION_TargetPosition" Type="TargetPosition" DataType="dint"/>
  465. <Input Address="Task 3.Outputs.c_SRD2_ROTATION_ProfileVelocity" Type="ProfileVelocity" DataType="dint"/>
  466. <Input Address="Task 3.Outputs.c_SRD2_ROTATION_ProfileAccel" Type="ProfileAccel" DataType="dint"/>
  467. <Input Address="Task 3.Outputs.c_SRD2_ROTATION_ProfileDecel" Type="ProfileDecel" DataType="dint"/>
  468. <Input Address="0x2A53:00" Type="SoftwareLimitDecel" DataType="udint"/>
  469. <Input Address="0x687D:01" Type="SoftwareLimitMinus" DataType="dint"/>
  470. <Input Address="0x687D:02" Type="SoftwareLimitPlus" DataType="dint"/>
  471. <Input Address="0x6898:00" Type="HomingMethod" DataType="byte"/>
  472. <Input Address="0x687C:00" Type="HomeOffset" DataType="dint"/>
  473. <Input Address="0x6899:01" Type="HomingVelocity" DataType="dint"/>
  474. <Input Address="0x6899:02" Type="HomingVelocitySlow" DataType="dint"/>
  475. <Input Address="0x689A:00" Type="HomingAccel" DataType="dint"/>
  476. <Input Address="0x2B53:00" Type="HomeAdjustment" DataType="dint"/>
  477. <Input Address="0x2910:00" Type="PeakCurrentLimit" DataType="int"/>
  478. <Input Address="0x2911:00" Type="ContinuousCurrentLimit" DataType="int"/>
  479. <Input Address="0x6885:00" Type="EStopDecel" DataType="udint"/>
  480. <Input Address="0x2903:00" Type="VelocityLimit" DataType="udint"/>
  481. <Input Address="0x6867:00" Type="PositionWindow" DataType="udint"/>
  482. <Input Address="0x2920:00" Type="FollowingErrorWindow" DataType="udint"/>
  483. <Output Address="Task 3.Outputs.c_SRD2_ROTATION_ControlWord" Type="ControlWord" DataType="uint"/>
  484. <Output Address="Task 3.Outputs.c_SRD2_ROTATION_ModeOfOperation" Type="ModeOfOperation" DataType="sint"/>
  485. <Output Address="Task 3.Outputs.c_SRD2_ROTATION_TargetPosition" Type="TargetPosition" DataType="dint"/>
  486. <Output Address="Task 3.Outputs.c_SRD2_ROTATION_ProfileVelocity" Type="ProfileVelocity" DataType="dint"/>
  487. <Output Address="Task 3.Outputs.c_SRD2_ROTATION_ProfileAccel" Type="ProfileAccel" DataType="dint"/>
  488. <Output Address="Task 3.Outputs.c_SRD2_ROTATION_ProfileDecel" Type="ProfileDecel" DataType="dint"/>
  489. <Output Address="0x2A53:00" Type="SoftwareLimitDecel" DataType="udint"/>
  490. <Output Address="0x687D:01" Type="SoftwareLimitMinus" DataType="dint"/>
  491. <Output Address="0x687D:02" Type="SoftwareLimitPlus" DataType="dint"/>
  492. <Output Address="0x6898:00" Type="HomingMethod" DataType="byte"/>
  493. <Output Address="0x687C:00" Type="HomeOffset" DataType="dint"/>
  494. <Output Address="0x6899:01" Type="HomingVelocity" DataType="dint"/>
  495. <Output Address="0x6899:02" Type="HomingVelocitySlow" DataType="dint"/>
  496. <Output Address="0x689A:00" Type="HomingAccel" DataType="dint"/>
  497. <!-- 58.822222 counts/deg -->
  498. <MotorType>Servo</MotorType>
  499. <MotorDriveDirection>-1</MotorDriveDirection>
  500. <!-- +1 = Forward and -1 = Backward-->
  501. <EncoderFeedbackDirectionMValue>0</EncoderFeedbackDirectionMValue>
  502. <EncoderFeedbackDirectionNValue>0</EncoderFeedbackDirectionNValue>
  503. <ReverseLimitSwitchPolarity>1</ReverseLimitSwitchPolarity>
  504. <ForwardLimitSwitchPolarity>1</ForwardLimitSwitchPolarity>
  505. <HomeSwitchPolarity>-1</HomeSwitchPolarity>
  506. <!-- Positive to Index -->
  507. <HomingMethod>34</HomingMethod>
  508. <HomingOffset>0</HomingOffset>
  509. <HomingSpeedHomeSwitch>2500</HomingSpeedHomeSwitch>
  510. <HomingSpeedEncoderIndex>2500</HomingSpeedEncoderIndex>
  511. <HomingAccelDecel>420000</HomingAccelDecel>
  512. <HomingTimeOut>15000</HomingTimeOut>
  513. <ProportionalGain>0</ProportionalGain>
  514. <IntegralGain>0</IntegralGain>
  515. <DerivativeGain>0</DerivativeGain>
  516. <IntegralLimit>0</IntegralLimit>
  517. <ErrorLimit>2000</ErrorLimit>
  518. <VoltageOffset>0</VoltageOffset>
  519. <ReverseSoftwareLimit>0</ReverseSoftwareLimit>
  520. <ForwardSoftwareLimit>0</ForwardSoftwareLimit>
  521. <Speed>529400</Speed>
  522. <Acceleration>84000</Acceleration>
  523. <Deceleration>84000</Deceleration>
  524. <FeedforwardVelocity>0</FeedforwardVelocity>
  525. <FeedforwardAcceleration>0</FeedforwardAcceleration>
  526. <OffOnError>1</OffOnError>
  527. </Axis>
  528. <!-- SRD AXES END -->
  529. </Controller>
  530. </BeckhoffCfg>