A standard 3-axis machine uses X, Y, Z. A hot-wire cutter remaps those letters to its two towers and optional rotary, so the same G-code dialect drives four or five axes.
The four cutting axes: X, Y, U, V
Each tower has two axes. The left tower is X (depth) and Y (height); the right tower is U (depth) and V (height). A 4-axis move sets all four at once:
G1 X10.5 Y20 U10.5 V20 F400
When the left and right values match, the wire stays parallel (a straight extrusion). When they differ, the wire tilts/skews — and over a sequence of moves, sweeps the morph surface. On a 2-axis machine the controller simply mirrors U/V onto X/Y.
The rotary axis: A
On 3/5-axis machines, a rotary A axis (degrees) turns the foam. An indexed-rotation program is a stack of cuts with A-rotation commands between them:
; ... cut stage 1 (A0) ...
M9 ; wire off
G0 A60 ; index rotate the foam 60°
; ... cut stage 2 (now at A60) ...
G0 A120 ; rotate again
; ...
The controller turns the rotary motor to each commanded angle between cutting passes. cncfoam.com inserts these A<degrees> commands automatically when you build an indexed cut (see Rotation axis & indexed cuts).
What the controller needs
Your firmware must be configured for the extra axes. FluidNC and GRBL variants can map additional stepper outputs to U/V/A. The number of usable axes depends on the board (number of stepper drivers) and the firmware build. See Controllers and Motors & drivers.
One payload, three transports
Whether you download, stream over USB or send over Wi-Fi, the G-code is identical — a single text stream of G0/G1 moves with M8/M9 for the wire and A commands for rotation. The controller turns that text into stepper pulses and PWM. See Transports.