hal_manualtoolchange(1)

πŸ“¦
version 2.9.4 Β· 2 versions
, in debian trixie, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– hal_manualtoolchange β€” the manual tool change bestie πŸ’–

HAL Non-realtime Component πŸŽ€ LinuxCNC

okay so hi!! you're here because your machine does not have an automatic tool changer and you're out here swapping tools with your own two hands like a legend. no worries bestie, hal_manualtoolchange has your back fr fr. it's the hal_manualtoolchange(1) page from the LinuxCNC docs, rewritten by me, for you. πŸ’…


✨ NAME ✨

hal_manualtoolchange β€” a HAL non-realtime component that makes manual tool changes work. 🌸


✨ SYNOPSIS ✨

loadusr hal_manualtoolchange

✨ DESCRIPTION ✨

hal_manualtoolchange is a LinuxCNC non-realtime component that lets people with machines that don't have automatic tool changers do their tool changes by hand. 🫢

So here's the vibe when it's all wired up: the moment an M6 tool change shows up, the motion component stops the spindle and pauses the program. then hal_manualtoolchange gets a signal from motion and pops up a tool change window telling the user which tool number to load, based on the last T- number that was programmed. that dialog just sits there, chillin', until you hit the "continue" button. the second you press it, hal_manualtoolchange signals motion that the tool change is done, which lets motion turn the spindle back on and pick the program back up where it left off. periodt. πŸ’…

also!! hal_manualtoolchange comes with a HAL pin for a button β€” you can hook it up to a literal physical button to finish the tool change and make the window prompt go away. that pin is hal_manualtoolchange.change_button. πŸ”₯

ngl the best part: hal_manualtoolchange works even when AXIS isn't the GUI you're using. and this component is most useful if you have presettable tools and you actually use the tool table. iykyk. πŸ‘‘


✨ PINS ✨

  • hal_manualtoolchange.number s32 in β€” receives the last programmed T- number. πŸ“
  • hal_manualtoolchange.change bit in β€” receives the signal to do a tool change.
  • hal_manualtoolchange.changed bit out β€” signifies that the tool change is complete. βœ…
  • hal_manualtoolchange.change_button bit in β€” the pin that lets an external switch signify that the tool change is complete. πŸ”˜

✨ USAGE ✨

the normal way to do this is to load the component in your HAL file and net up the right pins from the motion and io components. here's what's typical in a HAL file when you're running the hal_manualtoolchange non-realtime component πŸ‘‡

  • loadusr -W hal_manualtoolchange β€” this loads the hal_manualtoolchange non-realtime component and waits for the component to be ready before it continues. no racing ahead, we're patient. 🧘
  • net tool-change iocontrol.0.tool-change => hal_manualtoolchange.change β€” when an M6 code runs, motion sets iocontrol.0.tool-change high, which means "hey, tool change happening". this pin should be netted to hal_manualtoolchange.change. that makes the Tool change dialog show up on screen and wait for the user to either click the continue button on the dialog or press an externally connected button. πŸ‘€
  • net tool-changed iocontrol.0.tool-changed <= hal_manualtoolchange.changed β€” when the Tool change dialog's continue button gets pressed, it sets the hal_manualtoolchange.changed pin high. that should be netted to the iocontrol.0.tool-changed pin, which tells the motion controller that the tool change is complete and it can carry on executing the G-code program. 🏁
  • net tool-number iocontrol.0.tool-prep-number => hal_manualtoolchange.number β€” when a T- command runs in a G-code program, the tool number is held in iocontrol.0.tool-prep-number. this pin should be netted to hal_manualtoolchange.number. the value of this pin β€” the tool number β€” is displayed in the tool change dialog so the user knows which tool to load. πŸ”’
  • net tool-prepare-loopback iocontrol.0.tool-prepare => iocontrol.0.tool-prepared β€” the iocontrol.0.tool-prepare pin goes true when a Tn tool prepare is requested. since there's no automated tool changer, this pin should be netted to iocontrol.0.tool-prepared to indicate that the tool has been prepared. πŸ”

and if you wanna use an external button to tell the hal_manualtoolchange component that the tool change is done? literally just bring the button into HAL (through a parport input pin or a hostmot2 gpio input or something similar) and wire it straight to the hal_manualtoolchange.change_button pin. for example: πŸŽ€

net tool-changed-btn hal_manualtoolchange.change_button <= parport.0.pin-15-in

✨ SEE ALSO ✨

motion(1), iocontrol(1), halcmd(1).


ngl this page is giving LinuxCNC Documentation, 04 APR 2017, hal_manualtoolchange(1) energy and that's the whole sign-off bestie β€” go change some tools manually, you've got this πŸ’œπŸ¦‹βœ¨