cnccontrol.hal 4.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. # ---------------------------------------
  2. # --- CNC Control
  3. # --- LinuxCNC HAL configuration file
  4. # ------
  5. loadusr -Wn cnccontrol linuxcnchal_cnccontrol
  6. # --- Device config ---
  7. setp cnccontrol.config.twohand 1 # "two-hand" button enabled?
  8. setp cnccontrol.config.debug 0 # Device debug (0=off, 1=on, 2=verbose)
  9. setp cnccontrol.config.debugperf 0 # Performance monitoring (0=off, 1=on)
  10. setp cnccontrol.config.usblogmsg 0 # Send device debug messages through USB
  11. # --- Machine state ---
  12. net cncc-on halui.machine.is-on => cnccontrol.machine.on
  13. net cncc-estop halui.estop.is-activated => cnccontrol.machine.estop.active
  14. net cncc-jog halui.mode.is-manual => cnccontrol.machine.mode.jog
  15. net cncc-mdi halui.mode.is-mdi => cnccontrol.machine.mode.mdi
  16. net cncc-auto halui.mode.is-auto => cnccontrol.machine.mode.auto
  17. # --- Axis enable/disable ---
  18. setp cnccontrol.axis.x.enable 1
  19. setp cnccontrol.axis.y.enable 1
  20. setp cnccontrol.axis.z.enable 1
  21. setp cnccontrol.axis.u.enable 0
  22. setp cnccontrol.axis.v.enable 0
  23. setp cnccontrol.axis.w.enable 0
  24. setp cnccontrol.axis.a.enable 0
  25. setp cnccontrol.axis.b.enable 0
  26. setp cnccontrol.axis.c.enable 0
  27. # --- Axis position feedback ---
  28. net cncc-xposma halui.axis.x.pos-feedback => cnccontrol.axis.x.pos.machine-coords
  29. net cncc-xposus halui.axis.x.pos-relative => cnccontrol.axis.x.pos.user-coords
  30. net cncc-yposma halui.axis.y.pos-feedback => cnccontrol.axis.y.pos.machine-coords
  31. net cncc-yposus halui.axis.y.pos-relative => cnccontrol.axis.y.pos.user-coords
  32. net cncc-zposma halui.axis.z.pos-feedback => cnccontrol.axis.z.pos.machine-coords
  33. net cncc-zposus halui.axis.z.pos-relative => cnccontrol.axis.z.pos.user-coords
  34. # If more axes are enabled, connect pins here.
  35. # --- Jogging ---
  36. setp cnccontrol.jog.velocity-rapid 60000 # "rapid" move velocity
  37. setp cnccontrol.jog.increment.0 0.001 # 1st selectable increment
  38. setp cnccontrol.jog.increment.1 0.01 # 2nd selectable increment
  39. setp cnccontrol.jog.increment.2 0.1 # 3rd selectable increment
  40. setp cnccontrol.jog.increment.3 0.0 # 4th selectable increment
  41. setp cnccontrol.jog.increment.4 0.0 # 5th selectable increment
  42. setp cnccontrol.jog.increment.5 0.0 # 6th selectable increment
  43. net cncc-jogvel cnccontrol.jog.velocity => halui.axis.jog-speed
  44. net cncc-jogxp cnccontrol.jog.x.plus => halui.axis.x.plus
  45. net cncc-jogxm cnccontrol.jog.x.minus => halui.axis.x.minus
  46. net cncc-jogxinc cnccontrol.jog.x.inc => halui.axis.x.increment
  47. net cncc-jogxincp cnccontrol.jog.x.inc-plus => halui.axis.x.increment-plus
  48. net cncc-jogxincm cnccontrol.jog.x.inc-minus => halui.axis.x.increment-minus
  49. net cncc-jogyp cnccontrol.jog.y.plus => halui.axis.y.plus
  50. net cncc-jogym cnccontrol.jog.y.minus => halui.axis.y.minus
  51. net cncc-jogyinc cnccontrol.jog.y.inc => halui.axis.y.increment
  52. net cncc-jogyincp cnccontrol.jog.y.inc-plus => halui.axis.y.increment-plus
  53. net cncc-jogyincm cnccontrol.jog.y.inc-minus => halui.axis.y.increment-minus
  54. net cncc-jogzp cnccontrol.jog.z.plus => halui.axis.z.plus
  55. net cncc-jogzm cnccontrol.jog.z.minus => halui.axis.z.minus
  56. net cncc-jogzinc cnccontrol.jog.z.inc => halui.axis.z.increment
  57. net cncc-jogzincp cnccontrol.jog.z.inc-plus => halui.axis.z.increment-plus
  58. net cncc-jogzincm cnccontrol.jog.z.inc-minus => halui.axis.z.increment-minus
  59. # If more axes are enabled, connect pins here.
  60. # --- Master spindle control ---
  61. net cncc-srunb halui.spindle.0.runs-backward => cnccontrol.spindle.runs-bwd
  62. net cncc-srunf halui.spindle.0.runs-forward => cnccontrol.spindle.runs-fwd
  63. net cncc-sfwd cnccontrol.spindle.forward => halui.spindle.0.forward
  64. net cncc-srev cnccontrol.spindle.reverse => halui.spindle.0.reverse
  65. net cncc-sstart cnccontrol.spindle.start => halui.spindle.0.start
  66. net cncc-sstop cnccontrol.spindle.stop => halui.spindle.0.stop
  67. # --- Feed override ---
  68. net cncc-foscale cnccontrol.feed-override.scale => halui.feed-override.scale
  69. net cncc-fodec cnccontrol.feed-override.dec => halui.feed-override.decrease
  70. net cncc-foinc cnccontrol.feed-override.inc => halui.feed-override.increase
  71. net cncc-foval halui.feed-override.value => cnccontrol.feed-override.value
  72. setp cnccontrol.feed-override.max-value 1.2 # Feed override max (1.0 = 100%)
  73. setp cnccontrol.feed-override.min-value 0 # Feed override min
  74. # --- Program control ---
  75. net cncc-pstop cnccontrol.program.stop => halui.program.stop