EOFFSET_PER_ANGLE

NAME
SYNOPSIS
DESCRIPTION
FUNCTIONS
PINS
EXAMPLES
NOTES
AUTHOR
LICENSE

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

eoffset-per-angle.N (requires a floating-point thread)

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

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