profibus.hal 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. # ---------------------------------------
  2. # --- PROFIBUS DP
  3. # --- LinuxCNC HAL configuration file
  4. # ------
  5. # --- Load the pyprofibus HAL userspace module ---
  6. #
  7. # Parameters:
  8. # --loglevel LVL : Change the log level.
  9. #
  10. # --nice NICE : Renice the process. -20 <= NICE <= 19.
  11. # Default: Do not renice.
  12. #
  13. # The last parameter is the configuration file describing the PROFIBUS.
  14. #
  15. loadusr -Wn profibus pyprofibus-linuxcnc-hal pyprofibus.conf
  16. # --- Enable the used master-to-slave pins ---
  17. # All master-to-slave pins are deactivated by default.
  18. # So all master-to-slave pins connected below, should be activated here by writing
  19. # a '1' to the '.active' pin.
  20. # Deactivated master-to-slave pins will not be forwarded from LinuxCNC to the PROFIBUS.
  21. setp profibus.slave.8.input.bit.0.0.active 1
  22. setp profibus.slave.8.input.bit.0.1.active 1
  23. setp profibus.slave.8.input.bit.1.0.active 1
  24. setp profibus.slave.8.input.bit.1.1.active 1
  25. #setp profibus.slave.8.input.float.4.active 1
  26. #setp profibus.slave.8.input.float.8.active 1
  27. #setp profibus.slave.8.input.float.12.active 1
  28. # --- Connect master-to-slave pins ---
  29. net heartbeat => profibus.slave.8.input.bit.0.0
  30. net estop-out-not => profibus.slave.8.input.bit.0.1
  31. net spindle-cw => profibus.slave.8.input.bit.1.0
  32. net spindle-ccw => profibus.slave.8.input.bit.1.1
  33. #net xpos-cmd => profibus.slave.8.input.float.4
  34. #net ypos-cmd => profibus.slave.8.input.float.8
  35. #net zpos-cmd => profibus.slave.8.input.float.12
  36. # --- Enable the used slave-to-master pins ---
  37. # All slave-to-master pins are deactivated by default.
  38. # So all slave-to-master pins connected below, should be activated here by writing
  39. # a '1' to the '.active' pin.
  40. # Deactivated slave-to-master pins will not be forwarded from the PROFIBUS to LinuxCNC.
  41. setp profibus.slave.8.output.bit.0.0.active 1
  42. setp profibus.slave.8.output.bit.0.1.active 1
  43. setp profibus.slave.8.output.bit.0.2.active 1
  44. setp profibus.slave.8.output.bit.0.3.active 1
  45. # --- Connect slave-to-master pins ---
  46. net limit-x <= profibus.slave.8.output.bit.0.0
  47. net limit-y <= profibus.slave.8.output.bit.0.1
  48. net limit-z <= profibus.slave.8.output.bit.0.2
  49. net estop-in-not <= profibus.slave.8.output.bit.0.3
  50. # Always keep this at the end of this file.
  51. # This will activate data transfer between pyprofibus and LinuxCNC.
  52. setp profibus.config.ready 1