Machinekit Documentation

HAL Component — THCUD


thcud — Torch Height Control Up/Down Input




loadrt thcud


Torch Height Control This THC takes either an up or a down input from a THC

If enabled and torch is on and X + Y velocity is within tolerance of set speed allow the THC to offset the Z axis as needed to maintain voltage.

If enabled and torch is off and the Z axis is moving up remove any correction at a rate not to exceed the rate of movement of the Z axis.

If enabled and torch is off and there is no correction pass the Z position and feed back untouched.

If not enabled pass the Z position and feed back untouched.

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 ⇐

net torch-down thcud.torch-down ⇐

net torch-on motion.spindle-on ⇒ (start the arc)

net are-ok thc.arc-ok ⇐ ⇐ (arc ok signal)

HAL Motion Connections

net requested-vel thc.requested-vel ⇐ motion.requested-vel

net current-vel thc.current-vel ⇐ motion.current-vel

Pyvcp Connections In the xml file you need something like:

  <text>"THC Enable"</text>

Connect the Pyvcp pins in the postgui.hal file like this:

net thc-enable thcud.enable ⇐ pyvcp.thc-enable


thcud.N (requires a floating-point thread)


torch-up bit in - Connect to an input pin

torch-down bit in - Connect to input pin

current-vel float in - Connect to motion.current-vel

requested-vel float in - Connect to motion.requested-vel

torch-on bit in - Connect to motion.spindle-on

arc-ok bit in - Arc Ok from Plasma Torch

enable bit in - Enable the THC, if not enabled Z position is passed through

z-pos-in float in - Z Motor Position Command in from axis.n.motor-pos-cmd

z-pos-out float out - Z Motor Position Command Out

z-fb-out float out - Z Position Feedback to Axis

cur-offset float out - The Current Offset

vel-status bit out - When the THC thinks we are at requested speed

removing-offset bit out - Pin for testing


velocity-tol float rw - The deviation percent from planned velocity

correction-vel float rw - The Velocity to move Z to correct


John Thornton


GPLv2 or greater