THCUD(9)
πΈ THCUD(9) β a HAL Component, bestie β¨
okay so. this is a page from the HAL Component part of the manual, and it's literally called thcud, which stands for Torch Height Control Up/Down Input. yes. torch. plasma torch. we're doing metal cutting CNC today, and honestly? iconic. π
β¨ NAME β¨
thcud β Torch Height Control Up/Down Input π
π¦ SYNOPSIS π¦
loadrt thcud
and that's it. that's the whole load. slay.
π DESCRIPTION π
Torch Height Control. This THC takes either an up or a down input from a THC, no cap. that's its whole job and it does it gorgeously.
- If it's enabled and the torch is on and X + Y velocity is within tolerance of the set speed β allow the THC to offset the Z axis as needed to maintain voltage. π₯
- If it's enabled and the torch is off and the Z axis is moving up β remove any correction at a rate that does not exceed the rate of movement of the Z axis.
- If it's enabled and the torch is off and there is no correction β pass the Z position and feed back untouched. untouched!
- If it's not enabled β pass the Z position and feed back untouched. also untouched. we love a pass-through that minds its own business π
β Typical Physical Connections using a Parallel Port
Parallel Pin 12 <= THC controller Plasma Up
Parallel Pin 13 <= THC controller Plasma Down
Parallel Pin 15 <= Plasma Torch Arc Ok Signal
Parallel Pin 16 => Plasma Torch Start Arc Contacts
π HAL Plasma Connections
net torch-up thcud.torch-up <= parport.0.pin-12-in
net torch-down thcud.torch-down <= parport.0.pin-13-in
net torch-on spindle.0.on => parport.0.pin-16-out (start the arc)
net arc-ok thcud.arc-ok <= motion.digital-in-00 <= parport.0.pin-15-in
(arc ok signal)
π HAL Motion Connections
net requested-vel thcud.requested-vel <= motion.requested-vel
net current-vel thcud.current-vel <= motion.current-vel
π§ PyVCP Connections
In the XML file you need something like:
<pyvcp>
<checkbutton>
<text>"THC Enable"</text>
<halpin>"thc-enable"</halpin>
</checkbutton>
</pyvcp>
Then connect the PyVCP pins in the postgui.hal file like this:
net thc-enable thcud.enable <= pyvcp.thc-enable
π FUNCTIONS π
thcudβ and just so you know, it requires a floating-point thread. like, it needs one. don't come at it with anything else bestie π
π PINS π
thcud.torch-upbit in β Connect to an input pin.thcud.torch-downbit in β Connect to input pin.thcud.current-velfloat in β Connect tomotion.current-vel.thcud.requested-velfloat in β Connect tomotion.requested-vel.thcud.torch-onbit in β Connect tospindle.N.on.thcud.arc-okbit in β Arc Ok from Plasma Torch.thcud.enablebit in β Enable the THC; if it's not enabled the Z position is passed through. π«Άthcud.z-pos-infloat in β Z Motor Position Command in, fromaxis.n.motor-pos-cmd.thcud.z-pos-outfloat out β Z Motor Position Command Out.thcud.z-fb-outfloat out β Z Position Feedback to Axis.thcud.cur-offsetfloat out β The Current Offset.thcud.vel-statusbit out β When the THC thinks we are at requested speed.thcud.removing-offsetbit out β Pin for testing.thcud.correction-velfloat in β The Velocity to move Z to correct.
πΈ PARAMETERS πΈ
thcud.velocity-tolfloat rw β The deviation percent from planned velocity.
π AUTHOR π
John Thornton π«
π LICENSE π
GPLv2 or greater.
okay that's the whole page, you're so welcome π this was LinuxCNC Documentation, dated 2026-03-17 β go forth and cut some metal, bestie, you've got this fr fr π β¨
π¦ where this page comes from
- ubuntu resolute: linuxcnc-uspace 1:2.9.4-2ubuntu4 Β· GFDL-1.1-or-later
- ubuntu stonking: linuxcnc-uspace 1:2.9.4-2ubuntu4 Β· GFDL-1.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms