daily pastebin goal
71%
SHARE
TWEET

Untitled

a guest Oct 27th, 2011 37 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. loadrt trivkins
  3. loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[TRAJ]AXES
  4. loadrt probe_parport
  5. loadrt hostmot2
  6. loadrt hm2_pci config="firmware=hm2/5i20/SVST2_4_7I47.BIT num_encoders=0 num_pwmgens=0 num_stepgens=4"
  7. setp hm2_5i20.0.watchdog.timeout_ns 10000000
  8.  
  9. addf hm2_5i20.0.read servo-thread
  10. addf motion-command-handler servo-thread
  11. addf motion-controller servo-thread
  12. addf hm2_5i20.0.write         servo-thread
  13. addf hm2_5i20.0.pet_watchdog  servo-thread
  14.  
  15. loadrt and2
  16. addf and2.0 servo-thread
  17. #*******************
  18. #  AXIS X
  19. #*******************
  20. # Step Gen signals/setup
  21.  
  22. setp   hm2_5i20.0.stepgen.00.dirsetup        [AXIS_0]DIRSETUP
  23. setp   hm2_5i20.0.stepgen.00.dirhold         [AXIS_0]DIRHOLD
  24. setp   hm2_5i20.0.stepgen.00.steplen         [AXIS_0]STEPLEN
  25. setp   hm2_5i20.0.stepgen.00.stepspace       [AXIS_0]STEPSPACE
  26. setp   hm2_5i20.0.stepgen.00.position-scale  [AXIS_0]SCALE
  27. setp   hm2_5i20.0.stepgen.00.maxaccel         0
  28. setp   hm2_5i20.0.stepgen.00.maxvel           0
  29. setp   hm2_5i20.0.stepgen.00.step_type        0
  30.  
  31. net xpos-fb     axis.0.motor-pos-fb   <=  hm2_5i20.0.stepgen.00.position-fb
  32. net xpos-cmd    axis.0.motor-pos-cmd  =>  hm2_5i20.0.stepgen.00.position-cmd
  33. net xenable     axis.0.amp-enable-out =>  hm2_5i20.0.stepgen.00.enable
  34.  
  35. # ---setup home switch signals---
  36. net home-x axis.0.home-sw-in <=  hm2_5i20.0.gpio.036.in
  37.  
  38. #*******************
  39. #  AXIS Z
  40. #*******************
  41. # Step Gen signals/setup
  42.  
  43. setp   hm2_5i20.0.stepgen.02.dirsetup        [AXIS_2]DIRSETUP
  44. setp   hm2_5i20.0.stepgen.02.dirhold         [AXIS_2]DIRHOLD
  45. setp   hm2_5i20.0.stepgen.02.steplen         [AXIS_2]STEPLEN
  46. setp   hm2_5i20.0.stepgen.02.stepspace       [AXIS_2]STEPSPACE
  47. setp   hm2_5i20.0.stepgen.02.position-scale  [AXIS_2]SCALE
  48. setp   hm2_5i20.0.stepgen.02.maxaccel         0
  49. setp   hm2_5i20.0.stepgen.02.maxvel           0
  50. setp   hm2_5i20.0.stepgen.02.step_type        0
  51.  
  52. net zpos-fb     axis.2.motor-pos-fb   <=  hm2_5i20.0.stepgen.02.position-fb
  53. net zpos-cmd    axis.2.motor-pos-cmd  =>  hm2_5i20.0.stepgen.02.position-cmd
  54. net zenable     axis.2.amp-enable-out =>  hm2_5i20.0.stepgen.02.enable
  55.  
  56. # ---setup home switch signals---
  57.  
  58. net home-z axis.2.home-sw-in <=  hm2_5i20.0.gpio.032.in
  59.  
  60. #*******************
  61. #  AXIS A
  62. #*******************
  63. # Step Gen signals/setup
  64.  
  65. setp   hm2_5i20.0.stepgen.01.dirsetup        [AXIS_3]DIRSETUP
  66. setp   hm2_5i20.0.stepgen.01.dirhold         [AXIS_3]DIRHOLD
  67. setp   hm2_5i20.0.stepgen.01.steplen         [AXIS_3]STEPLEN
  68. setp   hm2_5i20.0.stepgen.01.stepspace       [AXIS_3]STEPSPACE
  69. setp   hm2_5i20.0.stepgen.01.position-scale  [AXIS_3]SCALE
  70. setp   hm2_5i20.0.stepgen.01.maxaccel         0
  71. setp   hm2_5i20.0.stepgen.01.maxvel           0
  72. setp   hm2_5i20.0.stepgen.01.step_type        0
  73.  
  74. net apos-fb     axis.3.motor-pos-fb   <=  hm2_5i20.0.stepgen.01.position-fb
  75. net apos-cmd    axis.3.motor-pos-cmd  =>  hm2_5i20.0.stepgen.01.position-cmd
  76. net aenable     axis.3.amp-enable-out =>  hm2_5i20.0.stepgen.01.enable
  77.  
  78. # ---setup home  switch signals---
  79. net home-a axis.3.home-sw-in <=  hm2_5i20.0.gpio.034.in
  80.  
  81. #******************************
  82. # connect miscellaneous signals
  83. #******************************
  84.  
  85. #  ---digital in / out signals---
  86. # External Program Run Button
  87. net program-run-btn halui.mode.auto <= hm2_5i20.0.gpio.038.in_not
  88. net program-run-btn and2.0.in0
  89. net program-is-auto and2.0.in1 <= halui.mode.is-auto
  90. net remote-prg-run halui.program.run <= and2.0.out
  91.  
  92. # External Home All Button
  93. # once homing is verified un-comment
  94. net home-machine halui.home-all <= hm2_5i20.0.gpio.030.in_not
  95.  
  96. # External Move to Load Position Button
  97. # once load location is established un-comment
  98. net load-machine halui.mdi-command-00 <=  hm2_5i20.0.gpio.028.in_not
  99.  
  100. #  ---estop signals---
  101.  
  102. net estop-out     <=  iocontrol.0.user-enable-out
  103. net estop-out     =>  iocontrol.0.emc-enable-in
  104.  
  105. #  ---toolchange signals for custom tool changer---
  106. net tool-number             <=  iocontrol.0.tool-prep-number
  107. net tool-change-request     <=  iocontrol.0.tool-change
  108. net tool-change-confirmed   =>  iocontrol.0.tool-changed
  109. net tool-prepare-request    <=  iocontrol.0.tool-prepare
  110. net tool-prepare-confirmed  =>  iocontrol.0.tool-prepared
  111.  
  112.  
  113.  
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top