EOFFSET_PER_ANGLE(9)

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

πŸ’« 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
⚠️ Unsupported fnum values default to use function f0. 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.active bit in (default: 0) β€” From: motion.eoffset-active
  • eoffset-per-angle.N.is-on bit in (default: 0) β€” From: halui.machine.is-on
  • eoffset-per-angle.N.enable-in bit in (default: 0) β€” Enable Input
  • eoffset-per-angle.N.radius-ref float in (default: 1) β€” Radius reference (see notes πŸ‘€)
  • eoffset-per-angle.N.angle float in (default: 0) β€” Input angle (in degrees)
  • eoffset-per-angle.N.start-angle float in (default: 0) β€” Start angle (in degrees)
  • eoffset-per-angle.N.fnum s32 in (default: 0) β€” Function selector (default 0)
  • eoffset-per-angle.N.rfraction float in (default: 0.1) β€” Offset amplitude (+/- fraction of radius_ref)
  • eoffset-per-angle.N.fmult float in (default: 6) β€” Offset frequency multiplier
  • eoffset-per-angle.N.k u32 in (default: 10000) β€” Scaling Factor (if 0, use 10000)
  • eoffset-per-angle.N.is-off bit out β€” invert is_on (for convenience)
  • eoffset-per-angle.N.enable-out bit out β€” To: axis.L.eoffset-enable
  • eoffset-per-angle.N.clear bit out β€” To: axis.L.eoffset-clear
  • eoffset-per-angle.N.kcounts s32 out β€” To: axis.L.eoffset-counts
  • eoffset-per-angle.N.kreciprocal float out β€” To: axis.L.eoffset-scale (1/k)
  • eoffset-per-angle.N.eoffset-dbg float out β€” offset (debug pin β€” use kcounts & kreciprocal)
  • eoffset-per-angle.N.state-dbg u32 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