Advertisement
Guest User

Untitled

a guest
Jul 24th, 2013
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.71 KB | None | 0 0
  1. # Generated by PNCconf at Wed Jul 24 17:12:41 2013
  2. # If you make changes to this file, they will be
  3. # overwritten when you run PNCconf again
  4.  
  5. loadrt trivkins
  6. loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[TRAJ]AXES
  7. loadrt probe_parport
  8. loadrt hostmot2
  9. loadrt hm2_pci config=" num_encoders=2 num_pwmgens=2 num_3pwmgens=0 num_stepgens=8 "
  10. setp hm2_5i25.0.pwmgen.pwm_frequency 100000
  11. setp hm2_5i25.0.pwmgen.pdm_frequency 6000000
  12. setp hm2_5i25.0.watchdog.timeout_ns 10000000
  13. #loadrt abs names=
  14. #loadrt lowpass names=
  15.  
  16. addf hm2_5i25.0.read servo-thread
  17. addf motion-command-handler servo-thread
  18. addf motion-controller servo-thread
  19. addf hm2_5i25.0.write servo-thread
  20. addf hm2_5i25.0.pet_watchdog servo-thread
  21.  
  22. # external output signals
  23.  
  24. # external input signals
  25.  
  26. #*******************
  27. # AXIS X
  28. #*******************
  29.  
  30. # Step Gen signals/setup
  31.  
  32. setp hm2_5i25.0.stepgen.00.dirsetup [AXIS_0]DIRSETUP
  33. setp hm2_5i25.0.stepgen.00.dirhold [AXIS_0]DIRHOLD
  34. setp hm2_5i25.0.stepgen.00.steplen [AXIS_0]STEPLEN
  35. setp hm2_5i25.0.stepgen.00.stepspace [AXIS_0]STEPSPACE
  36. setp hm2_5i25.0.stepgen.00.position-scale [AXIS_0]STEP_SCALE
  37. setp hm2_5i25.0.stepgen.00.step_type 0
  38. setp hm2_5i25.0.stepgen.00.control-type 0
  39. setp hm2_5i25.0.stepgen.00.maxaccel 75.0
  40. setp hm2_5i25.0.stepgen.00.maxvel 5.2
  41.  
  42. net x-pos-fb axis.0.motor-pos-fb <= hm2_5i25.0.stepgen.00.position-fb
  43. net x-pos-cmd axis.0.motor-pos-cmd => hm2_5i25.0.stepgen.00.position-cmd
  44. net x-enable axis.0.amp-enable-out => hm2_5i25.0.stepgen.00.enable
  45.  
  46. # ---setup home / limit switch signals---
  47.  
  48. net x-home-sw => axis.0.home-sw-in
  49. net x-neg-limit => axis.0.neg-lim-sw-in
  50. net x-pos-limit => axis.0.pos-lim-sw-in
  51.  
  52. #*******************
  53. # AXIS Y
  54. #*******************
  55.  
  56. # Step Gen signals/setup
  57.  
  58. setp hm2_5i25.0.stepgen.05.dirsetup [AXIS_1]DIRSETUP
  59. setp hm2_5i25.0.stepgen.05.dirhold [AXIS_1]DIRHOLD
  60. setp hm2_5i25.0.stepgen.05.steplen [AXIS_1]STEPLEN
  61. setp hm2_5i25.0.stepgen.05.stepspace [AXIS_1]STEPSPACE
  62. setp hm2_5i25.0.stepgen.05.position-scale [AXIS_1]STEP_SCALE
  63. setp hm2_5i25.0.stepgen.05.step_type 0
  64. setp hm2_5i25.0.stepgen.05.control-type 0
  65. setp hm2_5i25.0.stepgen.05.maxaccel 75.0
  66. setp hm2_5i25.0.stepgen.05.maxvel 4.8
  67. setp hm2_5i25.0.gpio.032.invert_output true
  68.  
  69. net y-pos-fb axis.1.motor-pos-fb <= hm2_5i25.0.stepgen.05.position-fb
  70. net y-pos-cmd axis.1.motor-pos-cmd => hm2_5i25.0.stepgen.05.position-cmd
  71. net y-enable axis.1.amp-enable-out => hm2_5i25.0.stepgen.05.enable
  72.  
  73. # ---setup home / limit switch signals---
  74.  
  75. net y-home-sw => axis.1.home-sw-in
  76. net y-neg-limit => axis.1.neg-lim-sw-in
  77. net y-pos-limit => axis.1.pos-lim-sw-in
  78.  
  79. #*******************
  80. # AXIS Z
  81. #*******************
  82.  
  83. # Step Gen signals/setup
  84.  
  85. setp hm2_5i25.0.stepgen.07.dirsetup [AXIS_2]DIRSETUP
  86. setp hm2_5i25.0.stepgen.07.dirhold [AXIS_2]DIRHOLD
  87. setp hm2_5i25.0.stepgen.07.steplen [AXIS_2]STEPLEN
  88. setp hm2_5i25.0.stepgen.07.stepspace [AXIS_2]STEPSPACE
  89. setp hm2_5i25.0.stepgen.07.position-scale [AXIS_2]STEP_SCALE
  90. setp hm2_5i25.0.stepgen.07.step_type 0
  91. setp hm2_5i25.0.stepgen.07.control-type 0
  92. setp hm2_5i25.0.stepgen.07.maxaccel 80.0
  93. setp hm2_5i25.0.stepgen.07.maxvel 0.5
  94. setp hm2_5i25.0.gpio.036.invert_output true
  95.  
  96. net z-pos-fb axis.2.motor-pos-fb <= hm2_5i25.0.stepgen.07.position-fb
  97. net z-pos-cmd axis.2.motor-pos-cmd => hm2_5i25.0.stepgen.07.position-cmd
  98. net z-enable axis.2.amp-enable-out => hm2_5i25.0.stepgen.07.enable
  99.  
  100. # ---setup home / limit switch signals---
  101.  
  102. net z-home-sw => axis.2.home-sw-in
  103. net z-neg-limit => axis.2.neg-lim-sw-in
  104. net z-pos-limit => axis.2.pos-lim-sw-in
  105.  
  106. #*******************
  107. # SPINDLE S
  108. #*******************
  109.  
  110. # ---setup spindle control signals---
  111.  
  112. net spindle-vel-cmd-rps <= motion.spindle-speed-out-rps
  113. net spindle-vel-cmd <= motion.spindle-speed-out
  114. net spindle-on <= motion.spindle-on
  115. net spindle-cw <= motion.spindle-forward
  116. net spindle-ccw <= motion.spindle-reverse
  117. net spindle-brake <= motion.spindle-brake
  118. net spindle-revs => motion.spindle-revs
  119. net spindle-at-speed => motion.spindle-at-speed
  120. net spindle-vel-fb => motion.spindle-speed-in
  121. net spindle-index-enable <=> motion.spindle-index-enable
  122.  
  123. # ---Setup spindle at speed signals---
  124.  
  125. sets spindle-at-speed true
  126.  
  127.  
  128. #******************************
  129. # connect miscellaneous signals
  130. #******************************
  131.  
  132. # ---HALUI signals---
  133.  
  134. net joint-select-a halui.joint.0.select
  135. net x-is-homed halui.joint.0.is-homed
  136. net jog-x-pos halui.jog.0.plus
  137. net jog-x-neg halui.jog.0.minus
  138. net jog-x-analog halui.jog.0.analog
  139. net joint-select-b halui.joint.1.select
  140. net y-is-homed halui.joint.1.is-homed
  141. net jog-y-pos halui.jog.1.plus
  142. net jog-y-neg halui.jog.1.minus
  143. net jog-y-analog halui.jog.1.analog
  144. net joint-select-c halui.joint.2.select
  145. net z-is-homed halui.joint.2.is-homed
  146. net jog-z-pos halui.jog.2.plus
  147. net jog-z-neg halui.jog.2.minus
  148. net jog-z-analog halui.jog.2.analog
  149. net jog-selected-pos halui.jog.selected.plus
  150. net jog-selected-neg halui.jog.selected.minus
  151. net spindle-manual-cw halui.spindle.forward
  152. net spindle-manual-ccw halui.spindle.reverse
  153. net spindle-manual-stop halui.spindle.stop
  154. net machine-is-on halui.machine.is-on
  155. net jog-speed halui.jog-speed
  156. net MDI-mode halui.mode.is-mdi
  157.  
  158. # ---coolant signals---
  159.  
  160. net coolant-mist <= iocontrol.0.coolant-mist
  161. net coolant-flood <= iocontrol.0.coolant-flood
  162.  
  163. # ---probe signal---
  164.  
  165. net probe-in => motion.probe-input
  166.  
  167. # ---motion control signals---
  168.  
  169. net in-position <= motion.in-position
  170. net machine-is-enabled <= motion.motion-enabled
  171.  
  172. # ---digital in / out signals---
  173.  
  174. # ---estop signals---
  175.  
  176. net estop-out <= iocontrol.0.user-enable-out
  177. net estop-out => iocontrol.0.emc-enable-in
  178.  
  179. # ---manual tool change signals---
  180.  
  181. loadusr -W hal_manualtoolchange
  182. net tool-change-request iocontrol.0.tool-change => hal_manualtoolchange.change
  183. net tool-change-confirmed iocontrol.0.tool-changed <= hal_manualtoolchange.changed
  184. net tool-number iocontrol.0.tool-prep-number => hal_manualtoolchange.number
  185. net tool-prepare-loopback iocontrol.0.tool-prepare => iocontrol.0.tool-prepared
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement