daily pastebin goal
34%
SHARE
TWEET

HAL file

a guest Jul 22nd, 2014 194 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Generated by stepconf at Tue Jul 15 12:57:50 2014
  2. # If you make changes to this file, they will be
  3. # overwritten when you run stepconf again
  4. loadrt trivkins
  5. loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[TRAJ]AXES
  6. loadrt hostmot2
  7. loadrt hm2_pci config="num_stepgens=5 num_encoders=2 num_pwmgens=1"
  8.  
  9. addf hm2_5i25.0.read         servo-thread
  10. addf motion-command-handler  servo-thread
  11. addf motion-controller       servo-thread
  12. addf hm2_5i25.0.write        servo-thread
  13. addf hm2_5i25.0.pet_watchdog servo-thread
  14. # net emcmot.00.enable <= axis.0.amp-enable-out
  15.  
  16. # X [0] Axis
  17. # axis enable chain
  18. newsig emcmot.00.enable bit
  19. sets emcmot.00.enable FALSE
  20. #net x-lim     joint.0.neg-lim-sw-in <= hm2_5i25.0.gpio.032.in
  21. #net x-lim     joint.0.pos-lim-sw-in <= hm2_5i25.0.gpio.032.in
  22.  
  23. net emcmot.00.enable => hm2_5i25.0.stepgen.00.enable
  24. # position command and feedback
  25. net emcmot.00.pos-cmd <= axis.0.motor-pos-cmd
  26. net emcmot.00.pos-cmd => hm2_5i25.0.stepgen.00.position-cmd
  27. net motor.00.pos-fb <= hm2_5i25.0.stepgen.00.position-fb
  28. net motor.00.pos-fb => axis.0.motor-pos-fb
  29. # timing parameters
  30. setp hm2_5i25.0.stepgen.00.dirsetup        [AXIS_0]DIRSETUP
  31. setp hm2_5i25.0.stepgen.00.dirhold         [AXIS_0]DIRHOLD
  32. setp hm2_5i25.0.stepgen.00.steplen         [AXIS_0]STEPLEN
  33. setp hm2_5i25.0.stepgen.00.stepspace       [AXIS_0]STEPSPACE
  34. setp hm2_5i25.0.stepgen.00.position-scale  [AXIS_0]SCALE
  35. setp hm2_5i25.0.stepgen.00.maxvel          [AXIS_0]STEPGEN_MAX_VEL
  36. setp hm2_5i25.0.stepgen.00.maxaccel        [AXIS_0]STEPGEN_MAX_ACC
  37. setp hm2_5i25.0.stepgen.00.step_type       0
  38.  
  39. # Y [1] Axis
  40. # axis enable chain
  41. newsig emcmot.01.enable bit
  42. sets emcmot.01.enable FALSE
  43. #net x-lim     joint.0.neg-lim-sw-in <= hm2_5i25.0.gpio.032.in
  44. #net x-lim     joint.0.pos-lim-sw-in <= hm2_5i25.0.gpio.032.in
  45. net emcmot.01.enable <= axis.1.amp-enable-out
  46. net emcmot.01.enable => hm2_5i25.0.stepgen.01.enable
  47. # position command and feedback
  48. net emcmot.01.pos-cmd <= axis.1.motor-pos-cmd
  49. net emcmot.01.pos-cmd => hm2_5i25.0.stepgen.01.position-cmd
  50. net motor.01.pos-fb <= hm2_5i25.0.stepgen.01.position-fb
  51. net motor.01.pos-fb => axis.1.motor-pos-fb
  52. # timing parameters
  53. setp hm2_5i25.0.stepgen.01.dirsetup        [AXIS_1]DIRSETUP
  54. setp hm2_5i25.0.stepgen.01.dirhold         [AXIS_1]DIRHOLD
  55. setp hm2_5i25.0.stepgen.01.steplen         [AXIS_1]STEPLEN
  56. setp hm2_5i25.0.stepgen.01.stepspace       [AXIS_1]STEPSPACE
  57. setp hm2_5i25.0.stepgen.01.position-scale  [AXIS_1]SCALE
  58. setp hm2_5i25.0.stepgen.01.maxvel          [AXIS_1]STEPGEN_MAX_VEL
  59. setp hm2_5i25.0.stepgen.01.maxaccel        [AXIS_1]STEPGEN_MAX_ACC
  60. setp hm2_5i25.0.stepgen.01.step_type       1
  61.  
  62. # Z [2] Axis
  63. # axis enable chain
  64. newsig emcmot.02.enable bit
  65. sets emcmot.02.enable FALSE
  66. #net x-lim     joint.0.neg-lim-sw-in <= hm2_5i25.0.gpio.032.in
  67. #net x-lim     joint.0.pos-lim-sw-in <= hm2_5i25.0.gpio.032.in
  68. net emcmot.02.enable <= axis.2.amp-enable-out
  69. net emcmot.02.enable => hm2_5i25.0.stepgen.02.enable
  70. # position command and feedback
  71. net emcmot.02.pos-cmd <= axis.2.motor-pos-cmd
  72. net emcmot.02.pos-cmd => hm2_5i25.0.stepgen.02.position-cmd
  73. net motor.02.pos-fb <= hm2_5i25.0.stepgen.02.position-fb
  74. net motor.02.pos-fb => axis.2.motor-pos-fb
  75. # timing parameters
  76. setp hm2_5i25.0.stepgen.02.dirsetup        [AXIS_2]DIRSETUP
  77. setp hm2_5i25.0.stepgen.02.dirhold         [AXIS_2]DIRHOLD
  78. setp hm2_5i25.0.stepgen.02.steplen         [AXIS_2]STEPLEN
  79. setp hm2_5i25.0.stepgen.02.stepspace       [AXIS_2]STEPSPACE
  80. setp hm2_5i25.0.stepgen.02.position-scale  [AXIS_2]SCALE
  81. setp hm2_5i25.0.stepgen.02.maxvel          [AXIS_2]STEPGEN_MAX_VEL
  82. setp hm2_5i25.0.stepgen.02.maxaccel        [AXIS_2]STEPGEN_MAX_ACC
  83. setp hm2_5i25.0.stepgen.02.step_type       2
  84.  
  85.  
  86.  
  87. # ################
  88. # G540 Charge pump
  89. # ################
  90. setp hm2_5i25.0.stepgen.04.dirsetup        100
  91. setp hm2_5i25.0.stepgen.04.dirhold         100
  92. setp hm2_5i25.0.stepgen.04.steplen         100
  93. setp hm2_5i25.0.stepgen.04.stepspace       100
  94. setp hm2_5i25.0.stepgen.04.position-scale  10000
  95. setp hm2_5i25.0.stepgen.04.maxvel          0
  96. setp hm2_5i25.0.stepgen.04.maxaccel        0
  97. # quadrature step mode for square wave out
  98. setp hm2_5i25.0.stepgen.04.step_type       2
  99. # velocity mode
  100. setp hm2_5i25.0.stepgen.04.control-type    1
  101. # velocity command of 0.25 is 10KHz when scale is 10000 in quadrature mode
  102. setp hm2_5i25.0.stepgen.04.velocity-cmd    0.25
  103. # enable charge pump with emcmot.00.enable
  104. net emcmot.00.enable => hm2_5i25.0.stepgen.04.enable
  105.  
  106. # net estop-out charge-pump.enable iocontrol.0.user-enable-out
  107. # net charge-pump <= charge-pump.out
  108. net estop-out <= iocontrol.0.user-enable-out
  109. net estop-out => iocontrol.0.emc-enable-in
  110.  
  111.  
  112.  
  113. loadusr -W hal_manualtoolchange
  114. net tool-change iocontrol.0.tool-change => hal_manualtoolchange.change
  115. net tool-changed iocontrol.0.tool-changed <= hal_manualtoolchange.changed
  116. net tool-number iocontrol.0.tool-prep-number => hal_manualtoolchange.number
  117. net tool-prepare-loopback iocontrol.0.tool-prepare => iocontrol.0.tool-prepared
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