THC(9)

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

πŸ’– thc β€” Torch Height Control πŸ’–

okay bestie, welcome to the thc page from the HAL Component section (that's a section 9 page, kernel/HAL girlies rise 🫢). Sit down, hydrate, and let's talk torch height control because this one literally controls a plasma torch's Z height in real time and it's giving main character energy πŸ”₯


✨ SYNOPSIS ✨

loadrt thc

That's it. That's the whole vibe. Just load the realtime component and go πŸ‘‘


πŸ¦‹ DESCRIPTION πŸ¦‹

Torch Height Control Mesa THC > Encoder > LinuxCNC THC component β€” like, that's the whole pipeline, chain of custody, the way that the signal travels through the system πŸ’…

So here's what's happening: the Mesa THC sends a frequency based on the voltage it detects over to the encoder. Then the velocity coming from the encoder gets converted into volts using the velocity scale parameter that lives inside the THC component. That's the glow-up: frequency in, volts out ✨

The THCAD card sends a frequency at 0 volts, which is lowkey annoying, so the scale offset parameter is there to zero out the calculated voltage. Rude of it, but the fix is built in πŸ’œ

πŸŽ€ Component Functions πŸŽ€

  • If it's enabled and the torch is on and the X + Y velocity is within tolerance of set speed, allow the THC to offset the Z axis as needed to maintain voltage. Bestie is literally doing the work to keep that voltage steady, periodt.
  • If it's enabled and the torch is off and the Z axis is moving up, remove any correction β€” but at a rate not to exceed the rate of movement of the Z axis. Respectful, no fighting the Z, we don't do that here πŸ™ˆ
  • If it's enabled and the torch is off and there is no correction, pass the Z position and feed back untouched. Zero drama, zero interference ✨
  • If it's not enabled, pass the Z position and feed back untouched. It literally does nothing and honestly? Iconic of it 🌸

🧚 Physical Connections 🧚

Plasma Torch Arc Voltage Signal => 6 x 487k 1% resistors => THC Arc Voltage In
THC Frequency Signal => Encoder #0, pin A (Input)
Plasma Torch Arc OK Signal => input pin
output pin => Plasma Torch Start Arc Contacts

Yes, 6 x 487k 1% resistors β€” careful, do not improvise on that part, the resistors are not a suggestion πŸ’€

🌈 HAL Plasma Connections 🌈

encoder.nn.velocity => thc.encoder-vel (tip voltage)
spindle.0.on => output pin (start the arc)
thc.arc-ok <= motion.digital-in-00 <= input pin (arc ok signal)

⭐ HAL Motion Connections ⭐

thc.requested-vel <= motion.requested-vel
thc.current-vel <= motion.current-vel

πŸ”₯ FUNCTIONS πŸ”₯

  • thc β€” requires a floating-point thread. Float thread only, no cap. Do not try to put it in a non-float thread, it will simply not eat πŸ’…

πŸ’œ PINS πŸ’œ

  • thc.encoder-vel float in β€” connect to hm2_5i20.0.encoder.00.velocity
  • thc.current-vel float in β€” connect to motion.current-vel
  • thc.requested-vel float in β€” connect to motion.requested-vel
  • thc.volts-requested float in β€” Tip Volts current_vel >= min_velocity requested
  • thc.vel-tol float in β€” Velocity Tolerance (Corner Lock)
  • thc.torch-on bit in β€” connect to spindle.N.on
  • thc.arc-ok bit in β€” Arc OK from Plasma Torch
  • thc.enable bit in β€” Enable the THC; if not enabled Z position is passed through
  • thc.z-pos-in float in β€” Z Motor Position Command in from axis.n.motor-pos-cmd
  • thc.z-pos-out float out β€” Z Motor Position Command Out
  • thc.z-fb-out float out β€” Z Position Feedback to Axis
  • thc.volts float out β€” The Calculated Volts
  • thc.vel-status bit out β€” When the THC thinks we are at requested speed (its little confidence flag πŸ₯Ή)
  • thc.offset-value float out β€” The Current Offset

🌸 PARAMETERS 🌸

  • thc.vel-scale float rw β€” the scale to convert the Velocity signal to Volts
  • thc.scale-offset float rw β€” the offset of the velocity input at 0 volts
  • thc.velocity-tol float rw β€” the deviation percent from planned velocity
  • thc.voltage-tol float rw β€” the deviation of Tip Voltage before correction takes place
  • thc.correction-vel float rw β€” the amount of change in user units per period to move Z to correct
Reminder bestie: those parameter names are exact. Type them wrong and you'll get nothing, and the nothing will be your problem 😭

πŸ‘‘ AUTHOR πŸ‘‘

John Thornton β€” we stan 🫢


πŸ’… LICENSE πŸ’…

GPLv2 or greater β€” share it, remix it, credit it, slay responsibly ✨


Okay that's the whole page, no skips, no summarising, every single pin and parameter present and accounted for πŸ’–

This cutie was brought to you by LinuxCNC Documentation, dated 2026-03-17, and the manual section is THC(9). Go forth and control that torch height, bestie, you've got this πŸŒˆπŸŽ€

πŸ“¦ where this page comes from