HALTCL(1)

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

✨ HALTCL ✨ (haltcl, manual page 1, HAL User's Manual bestie edition)

okay so real talk, this is the manual page for haltcl from the HAL User's Manual and it's literally the moment your terminal stops being a normie and starts speaking Tcl. buckle up. πŸ’…


πŸ’– NAME πŸ’–

haltcl β€” manipulate the LinuxCNC HAL from the command line using a Tcl interpreter.

yes bestie, that's the whole vibe. HAL + Tcl = chaos but make it organized chaos. πŸ¦‹


🌸 SYNOPSIS 🌸

haltcl [-i <INI file>] [filename]

that's it. that's the whole entrance. two little optional things and you're off. ✨


πŸŽ€ DESCRIPTION πŸŽ€

so haltcl is what you use to manipulate the HAL (Hardware Abstraction Layer) straight from the command line, and it does it through a Tcl interpreter, which is giving very much "I speak fluent robot and also I'm cute." πŸ‘‘

and here's the slay: haltcl can optionally read commands from a file (that's the filename situation), which means you can set up all your complex HAL configurations with a single command. one command. complex config. no cap. πŸ”₯


πŸ’œ OPTIONS πŸ’œ

  • -i <INI file> β€” if you specify this, the INI file gets read and used to create Tcl global variable arrays. an array gets created for each SECTION of the INI file, with elements for each ITEM in that section. it's giving "your INI file, but make it a Tcl data structure." 🧚

for example, if the INI file contains:

[SECTION_A]ITEM_1 =  1
[SECTION_A]ITEM_2 =  2
[SECTION_B]ITEM_1 = 10

the corresponding Tcl variables are:

SECTION_A(ITEM_1) =  1
SECTION_A(ITEM_2) =  2
SECTION_B(ITEM_1) = 10

see how it just maps? iconic behavior honestly. ⭐

  • -ini <INI file> β€” declining usage, use -i <INI file>. yeah bestie this one is on its way out, it's giving deprecated older sibling. use -i. πŸ™ˆ
  • filename β€” if you specify this, the Tcl commands inside filename get executed. and if you don't specify a filename, haltcl just opens up an interactive session for you. so like, either it runs your script or it hands you the mic. both valid. 🎀

🌈 COMMANDS 🌈

okay so haltcl isn't just a Tcl interpreter, it's a Tcl interpreter that got augmented β€” it comes with commands for the hal language, exactly as described over in halcmd(1). glow up fr fr. πŸ’–

you can list all those augmented commands with this:

haltcl: hal --commands

and the list that comes back is:

addf alias delf delsig getp gets ptype stype help linkpp linkps
linksp list loadrt loadusr lock net newsig save
setexact_for_test_suite_only setp sets show source start status stop
unalias unlinkp unload unloadrt unloadusr unlock waitusr

look at that lineup. main character energy from every single one. πŸ‘‘

now, two of those augmented commands β€” list and gets β€” need special treatment, because Tcl already has built-in commands with the exact same names and we are NOT doing that conflict. to use them, you gotta precede them with the keyword hal:

hal list
hal gets

that's it. prefix and you're good. the way that solves the whole name collision… obsessed. 🫢


😭 REPORTING BUGS 😭

found a bug? report it to the LinuxCNC bug tracker here: ⟨https://github.com/LinuxCNC/linuxcnc/issues⟩

please do, they wanna know. πŸ’€


this is free software; see the source for copying conditions. there is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

so like… it's free, it's yours, but if it breaks, it's not their problem. periodt. πŸ™ˆ


πŸ¦‹ SEE ALSO πŸ¦‹

go read those too, they're the extended universe. ✨


and that's a wrap on the HALTCL(1) page bestie!! this one came out of the LinuxCNC Documentation, dated 2012-01-31, and it lives at section HALTCL(1) of the manual. go forth and configure. slay. πŸ’…πŸ’–πŸŒˆ

πŸ“¦ where this page comes from