milltask(1)

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

✨ milltask β€” the LinuxCNC manual, but make it bestie-coded ✨

okay so welcome to milltask(1) πŸ’– this is one of those pages from The Enhanced Machine Controller manual situation, and honestly? she's giving internal plumbing that you were never supposed to meet directly. let's get into it 🫢


🌸 NAME 🌸

milltask β€” the non-realtime task controller for LinuxCNC, aka the backstage crew of your whole setup πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

okay bestie, listen. milltask is an internal process of LinuxCNC. like, she's not out here getting invoked by hand β€” she gets called by an INI file setting, and that setting is:

[TASK]TASK=milltask

that's it, that's the summoning ritual ✨

so what does she actually do? the milltask process creates the ini.* HAL pins listed down below, and those pins are owned by the inihal component. and here's the slay part: you can modify those pins while LinuxCNC is running to change values that are normally just... sitting there, statically specified in an INI file. no restart, no drama πŸ’…

now the inihal pins get sampled in every task cycle, BUT β€” and this is the plot twist β€” commands that are affected by their values typically use whatever value was present at the time when the command was processed. the commands this applies to are:

  • all codes handled by the interpreter (G-code programs and MDI commands), and
  • NML jogging commands issued by a GUI (including halui).

Wheel jogging is a whole different vibe though β€” it's implemented in the realtime motion module, so inihal pin changes (for example, ini.*.max_velocity and ini.*.max_acceleration) may be honored as soon as the altered values get propagated to the motion module. no cap πŸƒβ™€οΈπŸ’¨


πŸ‘‘ PINS πŸ‘‘

⭐ Per-joint pins (N == joint number)

  • ini.N.backlash β€” lets you adjust [JOINT_N]BACKLASH
  • ini.N.ferror β€” lets you adjust [JOINT_N]FERROR
  • ini.N.min_ferror β€” lets you adjust [JOINT_N]MIN_FERROR
  • ini.N.min_limit β€” lets you adjust [JOINT_N]MIN_LIMIT
  • ini.N.max_limit β€” lets you adjust [JOINT_N]MAX_LIMIT
  • ini.N.max_velocity β€” lets you adjust [JOINT_N]MAX_VELOCITY
  • ini.N.max_acceleration β€” lets you adjust [JOINT_N]MAX_ACCELERATION
  • ini.N.home β€” lets you adjust [JOINT_N]HOME
  • ini.N.home_offset β€” lets you adjust [JOINT_N]HOME_OFFSET
  • ini.N.home_offset β€” lets you adjust [JOINT_N]HOME_SEQUENCE
yes, ini.N.home_offset shows up twice and the second one maps to [JOINT_N]HOME_SEQUENCE. that's what the page says, so that's what we're saying. we do not fix the lore, we just report it πŸ™ˆ

🌈 Per-axis pins (L == axis letter)

  • ini.L.min_limit β€” lets you adjust [AXIS_L]MIN_LIMIT
  • ini.L.max_limit β€” lets you adjust [AXIS_L]MAX_LIMIT
  • ini.L.max_velocity β€” lets you adjust [AXIS_L]MAX_VELOCITY
  • ini.L.max_acceleration β€” lets you adjust [AXIS_L]MAX_ACCELERATION

πŸ’œ Global pins

  • ini.traj_default_acceleration β€” lets you adjust [TRAJ]DEFAULT_ACCELERATION
  • ini.traj_default_velocity β€” lets you adjust [TRAJ]DEFAULT_VELOCITY
  • ini.traj_max_acceleration β€” lets you adjust [TRAJ]MAX_ACCELERATION
  • ini.traj_max_velocity β€” lets you adjust [TRAJ]MAX_VELOCITY

πŸŽ€ Global pins (arc_blend trajectory planner)

  • ini.traj_arc_blend_enable β€” lets you adjust [TRAJ]ARC_BLEND_ENABLE
  • ini.traj_arc_blend_fallback_enable β€” lets you adjust [TRAJ]ARC_BLEND_FALLBACK_ENABLE
  • ini.traj_arc_blend_gap_cycles β€” lets you adjust [TRAJ]ARC_OPTIMIZATION_DEPTH
  • ini.traj_arc_blend_optimization_depth β€” lets you adjust [TRAJ]ARC_BLEND_GAP_CYCLES
  • ini.traj_arc_blend_ramp_freq β€” lets you adjust [TRAJ]ARC_BLEND_RAMP_FREQ

πŸ’€ NOTES πŸ’€

okay important things, bestie, pay attention 🫢

the inihal pins cannot be linked or set in a HAL file that's specified by an INI file [HAL]HALFILE item β€” and why? because they don't exist yet! they aren't created until milltask is started. it's giving "you can't sit with us, we're not even here yet" 😭

but you're not stuck, because the inihal pin values can be altered by:

  • independent halcmd programs specified by [APPLICATION]APP items, or
  • GUIs that support a [HAL]POSTGUI_HALFILE.

and one more thing β€” the INI file does not automatically update itself with values altered by inihal pin settings. it can be updated using the calibration program (emccalib.tcl) when you're using a [HAL]POSTGUI_HALFILE. that's the whole note, periodt πŸ’…


and that's the page!! this was The Enhanced Machine Controller manual's milltask(1), dated September 30, 2014, and you've officially made it to the end of the page πŸŽ€ tysm for reading, go forth and adjust your pins responsibly, mwah πŸ’–βœ¨πŸ¦‹