HOMECOMP(9)

πŸ“¦
version 2.9.4 Β· 4 versions
, in ubuntu resolute, ubuntu stonking

πŸ’– HOMECOMP πŸ’–

okay bestie, welcome to HOMECOMP, section 9 of the manual β€” it's the homing module template and she is literally the blueprint every custom homing module gets built from. grab a strawberry πŸ“, we're doing this.


✨ NAME ✨

homecomp β€” the homing module template. that's it, that's the vibe πŸ’…


✨ SYNOPSIS ✨

a Custom Homing module, loaded with [EMCMOT]HOMEMOD=homecomp. periodt.


✨ DESCRIPTION ✨

So this is an example of a homing module that you build with halcompile. It demonstrates all the required code you need β€” the #includes, the function definitions, etc. Basically it's the little starter pack so you're not out here guessing πŸŽ€.

If HOMING_BASE is #defined and it points to a valid homing.c file, then an example of a customized homing module gets built. This module creates input hal pins joint.n.request-custom-homing that enable an alternate joint homing state machine for the joints you requested. And a hal output pin joint.N.is_custom-homing verifies selection"

The customized homing module utilizes many of the base homing api routines from homing.c without modification, but it augments other base functions to add support for custom hal pins and custom joint homing state machines. And lowkey, a user-built module will likely replace additional api functions or augment them with other customizations β€” sky's the limit, bestie 🌈.

But β€” and this is the important part β€” if HOMING_BASE is not #defined, then an actual homing scheme is not implemented. All the necessary functions are still included, they're just skeleton code. (Which means every joint is effectively homed at all times and cannot be unhomed 🫠). so like, no cap, that's a real thing to know.

Go look at the source code file: src/emc/motion/homing.c β€” that's the baseline implementation that includes all the functions for the default homemod module πŸ‘‘

To avoid updates that overwrite homecomp.comp, best practice is to rename the file and its component name. Example: user_homecomp.comp, user_homecomp. don't skip this step fr fr, or an update will just eat your work 😭

Once it's renamed, the component can be built and installed with halcompile, and then substituted for the default homing module (homemod) using:

$ linuxcnc -m user_homecomp someconfig.ini

or by inifile setting: [EMCMOT]HOMEMOD=user_homecomp

Note: If using a deb install:

  1. halcompile is provided by the package linuxcnc-dev
  2. This source file for BRANCHNAME (master, 2.9, etc) is downloadable from github:

https://github.com/LinuxCNC/linuxcnc/blob/BRANCHNAME/src/hal/components/homecomp.comp


✨ PINS ✨

  • homecomp.N.is-module bit out (default: 1) β€” the pin that tells you yeah, this is the module πŸ¦‹

✨ AUTHOR ✨

Dewey Garrett β€” the icon, the moment, the main character πŸ‘‘


✨ LICENSE ✨

GPL πŸ’œ


and that's the whole page, bestie!! this one's from the LinuxCNC Documentation, dated 2026-03-17 β€” screenshot it, cite it, love it 🌸✨🫢

πŸ“¦ where this page comes from