Scroll to navigation

EOFFSET_PER_ANGLE(9) HAL Component EOFFSET_PER_ANGLE(9)

NAME

eoffset_per_angle - Compute External Offset Per Angle

SYNOPSIS

loadrt eoffset_per_angle [count=N|names=name1[,name2...]]

DESCRIPTION

An offset is computed (from one of several functions) based on an input angle in degrees. The angle could be a rotary coordinate value or a spindle angle.

The computed offset is represented as an s32 kcounts output pin that is a compatible input to external offset pins like axis.L.eoffset-counts where L is the coordinate letter. Scaling of the s32 kcounts is controlled by the input (k) -- its reciprocal value is presented on an output pin (kreciprocal) for connection to axis.L.eoffset-scale. The default value for k should be suitable for most uses.

The built-in functions use pins fmult and rfraction to control the output frequency (or number of polygon sides) and amplitude respectively. The rfraction pin controls the offset amplitude as a fraction of the radius-ref pin.

One of the four built-in functions is specified 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.

FUNCTIONS

PINS

From: motion.eoffset-active
From: halui.machine.is-on
Enable Input
Radius reference (see notes)
Input angle (in degrees)
Start angle (in degrees)
Function selector (default 0)
Offset amplitude (+/- fraction of radius_ref)
Offset frequency multiplier
Scaling Factor (if 0, use 10000)
invert is_on (for convenience)
To: axis.L.eoffset-enable
To: axis.L.eoffset-clear
To: axis.L.eoffset-counts
To: axis.L.eoffset-scale (1/k)
offset (debug pin--use kcounts & kreciprocal)
state (debug pin)

EXAMPLES

An example simulation configuration is provided at: configs/sim/axis/external_offsets/opa.ini. A simulated XZC machine uses the C coordinate angle to offset the transverse X coordinate according to the selected fnum function.

NOTES

radius-ref: The computed offsets are based on the radius-ref pin value. This pin may be set to a constant radius value or controlled by a user interface or by g code program (using M68 and a motion.analog-out-NN pin for instance).

Stopping: When the enable-in pin is deasserted, the offset is returned to zero respecting the allocated acceleration and velocity limits. The allocations for coordinate L are typically controlled by an ini file setting: [AXIS_L]OFFSET_AV_RATIO.

If unsupported parameters are supplied to a function (for instance a polygon with fewer than three sides), the current offset will be returned to zero (respecting velocity and acceleration constraints). After correcting the offending parameter, the enable-in pin must be toggled to resume offset computations.

AUTHOR

Dewey Garrett

LICENSE

GPL

2024-07-13 LinuxCNC Documentation