EOFFSET_PER_ANGLE(9)
π« EOFFSET_PER_ANGLE π«
okay bestie, so this is a page from the HAL Component manual (that's section 9 of the LinuxCNC docs, iykyk), and it's about eoffset_per_angle β truly one of the cutest little components in the whole toolkit. Let's get into it π«Ά
β¨ NAME β¨
eoffset_per_angle β Compute External Offset Per Angle
like. the name literally ate. it computes an external offset, and it does it per angle. what more do you want from her π
πΈ SYNOPSIS πΈ
loadrt eoffset_per_angle [count=N|names=name1[,name2...]]
π¦ DESCRIPTION π¦
So basically: you feed her an angle in degrees, and she computes an offset from it β using one of several functions (we'll get to those, stay with me). That input angle could be a rotary coordinate value, or it could be a spindle angle. Either way she's ready π
The computed offset comes out as an s32 kcounts output pin, and it's a compatible input to external offset pins like axis.L.eoffset-counts β where L is the coordinate letter (yes, X, Y, Z, whatever your heart desires). β¨
Scaling of that s32 kcounts situation is controlled by the input (k) β and its reciprocal value gets presented on an output pin (kreciprocal), which you can connect to axis.L.eoffset-scale. The default value for k should be suitable for most uses, so like, breathe, you probably don't need to touch it π
The built-in functions use the pins fmult and rfraction to control the output frequency (or the number of polygon sides) and the amplitude respectively. And the rfraction pin controls the offset amplitude as a fraction of the radius-ref pin. so it's all relative, it's all proportional, it's all giving very composed π
One of the four built-in functions gets picked by the fnum pin:
0: f0 inside polygon (requires fmult == nsides >= 3)
1: f1 outside polygon (requires fmult == nsides >= 3)
2: f2 sinusoid
3: f3 square wave
β οΈ Unsupportedfnumvalues default to use functionf0. so if you type something cursed, she's just gonna do f0 and move on. no drama.
π₯ FUNCTIONS π₯
eoffset-per-angle.Nβ requires a floating-point thread (no cap, she needs the float thread, periodt)
π PINS π
eoffset-per-angle.N.activebit in (default:0) β From:motion.eoffset-activeeoffset-per-angle.N.is-onbit in (default:0) β From:halui.machine.is-oneoffset-per-angle.N.enable-inbit in (default:0) β Enable Inputeoffset-per-angle.N.radius-reffloat in (default:1) β Radius reference (see notes π)eoffset-per-angle.N.anglefloat in (default:0) β Input angle (in degrees)eoffset-per-angle.N.start-anglefloat in (default:0) β Start angle (in degrees)eoffset-per-angle.N.fnums32 in (default:0) β Function selector (default0)eoffset-per-angle.N.rfractionfloat in (default:0.1) β Offset amplitude (+/- fraction ofradius_ref)eoffset-per-angle.N.fmultfloat in (default:6) β Offset frequency multipliereoffset-per-angle.N.ku32 in (default:10000) β Scaling Factor (if0, use10000)eoffset-per-angle.N.is-offbit out β invertis_on(for convenience)eoffset-per-angle.N.enable-outbit out β To:axis.L.eoffset-enableeoffset-per-angle.N.clearbit out β To:axis.L.eoffset-cleareoffset-per-angle.N.kcountss32 out β To:axis.L.eoffset-countseoffset-per-angle.N.kreciprocalfloat out β To:axis.L.eoffset-scale(1/k)eoffset-per-angle.N.eoffset-dbgfloat out β offset (debug pin β usekcounts&kreciprocal)eoffset-per-angle.N.state-dbgu32 out β state (debug pin)
π EXAMPLES π
There's an example simulation config waiting for you at:
configs/sim/axis/external_offsets/opa.ini
It's a simulated XZC machine π and what she does is use the C coordinate angle to offset the transverse X coordinate, according to whichever fnum function you selected. iconic behavior, honestly.
π NOTES π
radius-ref: The computed offsets are based on the radius-ref pin value. That pin may be set to a constant radius value, OR it can be controlled by a user interface, OR by a g code program (using M68 and a motion.analog-out-NN pin, for instance). so many options, she's flexible fr fr β¨
Stopping: When the enable-in pin is deasserted, the offset is returned to zero β and it respects the allocated acceleration and velocity limits while doing it, because she's polite. Those allocations for coordinate L are typically controlled by an ini file setting:
[AXIS_L]OFFSET_AV_RATIO
(and yes, L there is the coordinate letter, same as before π«Ά)
The important caveat, bestie, pls read this one: If unsupported parameters are supplied to a function β for instance, a polygon with fewer than three sides (girl. a polygon. with two sides. no) β then the current offset will be returned to zero, respecting velocity and acceleration constraints. And here's the part that gets people: after you correct the offending parameter, the enable-in pin must be toggled to resume offset computations. she will not just pick back up on her own. toggle it. that's the vibe check π
π§ AUTHOR π§
Dewey Garrett β thank you for your service, king π
β LICENSE β
GPL β free as in freedom, slay π
πΈ and that's the whole page, bestie!! written up by LinuxCNC Documentation, dated 2026-03-17, tagged EOFFSET_PER_ANGLE(9). go forth and offset things per angle, you're gonna do amazing π«Άβ¨
π¦ 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