Advertisement
Guest User

Untitled

a guest
Apr 7th, 2014
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.13 KB | None | 0 0
  1. ***7i76.hal
  2. loadrt trivkins
  3. loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[TRAJ]AXES
  4. loadrt hostmot2
  5. loadrt [HOSTMOT2](DRIVER) config=[HOSTMOT2](CONFIG)
  6. setp hm2_[HOSTMOT2](BOARD).0.watchdog.timeout_ns 10000000
  7.  
  8. addf hm2_[HOSTMOT2](BOARD).0.read servo-thread
  9. addf motion-command-handler servo-thread
  10. addf motion-controller servo-thread
  11. addf hm2_[HOSTMOT2](BOARD).0.write servo-thread
  12. addf hm2_[HOSTMOT2](BOARD).0.pet_watchdog servo-thread
  13.  
  14. # X [0] Axis
  15. net emcmot.00.enable axis.0.amp-enable-out hm2_[HOSTMOT2](BOARD).0.stepgen.00.enable hm2_5i25.0.7i76.0.0.output-02
  16. net emcmot.00.pos-cmd axis.0.motor-pos-cmd hm2_[HOSTMOT2](BOARD).0.stepgen.00.position-cmd
  17. net motor.00.pos-fb hm2_[HOSTMOT2](BOARD).0.stepgen.00.position-fb axis.0.motor-pos-fb
  18. setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.dirsetup [AXIS_0]DIRSETUP
  19. setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.dirhold [AXIS_0]DIRHOLD
  20. setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.steplen [AXIS_0]STEPLEN
  21. setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.stepspace [AXIS_0]STEPSPACE
  22. setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.position-scale [AXIS_0]SCALE
  23. setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.maxvel [AXIS_0]STEPGEN_MAX_VEL
  24. setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.maxaccel [AXIS_0]STEPGEN_MAX_ACC
  25. setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.step_type 0
  26. setp axis.0.jog-vel-mode 1
  27.  
  28. # Y [1] Axis
  29. net emcmot.01.enable axis.1.amp-enable-out hm2_[HOSTMOT2](BOARD).0.stepgen.01.enable hm2_5i25.0.7i76.0.0.output-05
  30. net emcmot.01.pos-cmd axis.1.motor-pos-cmd hm2_[HOSTMOT2](BOARD).0.stepgen.01.position-cmd
  31. net motor.01.pos-fb hm2_[HOSTMOT2](BOARD).0.stepgen.01.position-fb axis.1.motor-pos-fb
  32. setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.dirsetup [AXIS_1]DIRSETUP
  33. setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.dirhold [AXIS_1]DIRHOLD
  34. setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.steplen [AXIS_1]STEPLEN
  35. setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.stepspace [AXIS_1]STEPSPACE
  36. setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.position-scale [AXIS_1]SCALE
  37. setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.maxvel [AXIS_1]STEPGEN_MAX_VEL
  38. setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.maxaccel [AXIS_1]STEPGEN_MAX_ACC
  39. setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.step_type 0
  40. setp axis.1.jog-vel-mode 1
  41.  
  42. # Z [2] Axis
  43. net emcmot.02.enable axis.2.amp-enable-out hm2_[HOSTMOT2](BOARD).0.stepgen.02.enable hm2_5i25.0.7i76.0.0.output-08
  44. net emcmot.02.pos-cmd axis.2.motor-pos-cmd hm2_[HOSTMOT2](BOARD).0.stepgen.02.position-cmd
  45. net motor.02.pos-fb hm2_[HOSTMOT2](BOARD).0.stepgen.02.position-fb axis.2.motor-pos-fb
  46. setp hm2_[HOSTMOT2](BOARD).0.stepgen.02.dirsetup [AXIS_2]DIRSETUP
  47. setp hm2_[HOSTMOT2](BOARD).0.stepgen.02.dirhold [AXIS_2]DIRHOLD
  48. setp hm2_[HOSTMOT2](BOARD).0.stepgen.02.steplen [AXIS_2]STEPLEN
  49. setp hm2_[HOSTMOT2](BOARD).0.stepgen.02.stepspace [AXIS_2]STEPSPACE
  50. setp hm2_[HOSTMOT2](BOARD).0.stepgen.02.position-scale [AXIS_2]SCALE
  51. setp hm2_[HOSTMOT2](BOARD).0.stepgen.02.maxvel [AXIS_2]STEPGEN_MAX_VEL
  52. setp hm2_[HOSTMOT2](BOARD).0.stepgen.02.maxaccel [AXIS_2]STEPGEN_MAX_ACC
  53. setp hm2_[HOSTMOT2](BOARD).0.stepgen.02.step_type 0
  54. setp axis.2.jog-vel-mode 1
  55.  
  56. #connect prox switches to limit and home inputs
  57. net Xprox hm2_5i25.0.7i76.0.0.input-08 axis.0.pos-lim-sw-in axis.0.neg-lim-sw-in axis.0.home-sw-in
  58. net Yprox hm2_5i25.0.7i76.0.0.input-09 axis.1.pos-lim-sw-in axis.1.neg-lim-sw-in axis.1.home-sw-in
  59. net Zprox hm2_5i25.0.7i76.0.0.input-10 axis.2.pos-lim-sw-in axis.2.neg-lim-sw-in axis.2.home-sw-in
  60.  
  61. # Spindle Control
  62. net Sfwd motion.spindle-forward hm2_5i25.0.7i76.0.0.output-00
  63. setp hm2_5i25.0.7i76.0.0.spinout-minlim 0
  64. setp hm2_5i25.0.7i76.0.0.spinout-maxlim 20000
  65. setp hm2_5i25.0.7i76.0.0.spinout-scalemax 20000
  66. net Scmd motion.spindle-speed-out hm2_5i25.0.7i76.0.0.spinout
  67.  
  68. # Safety Relay Monitoring Contacts
  69. net estop-enable hm2_5i25.0.7i76.0.0.input-00 iocontrol.0.emc-enable-in hm2_5i25.0.7i76.0.0.spinena
  70.  
  71. net tool-prep-loop iocontrol.0.tool-prepare => iocontrol.0.tool-prepared
  72. net tool-change-loop iocontrol.0.tool-change => iocontrol.0.tool-changed
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement