.\"******************************************************************* .\" .\" This file was extracted from hal/components/ilowpass.comp using halcompile.g. .\" Modify the source file. .\" .\"******************************************************************* .TH ILOWPASS "9" "2023-02-10" "LinuxCNC Documentation" "HAL Component" .SH NAME ilowpass \- Low-pass filter with integer inputs and outputs .SH SYNOPSIS .HP .B loadrt ilowpass [count=\fIN\fB|names=\fIname1\fB[,\fIname2...\fB]] .SH DESCRIPTION While it may find other applications, this component was written to create smoother motion while jogging with an MPG. In a machine with high acceleration, a short jog can behave almost like a step function. By putting the \fBilowpass\fR component between the MPG encoder \fBcounts\fR output and the axis \fRjog-counts\fR input, this can be smoothed. Choose \fBscale\fR conservatively so that during a single session there will never be more than about 2e9/\fBscale\fR pulses seen on the MPG. Choose \fBgain\fR according to the smoothing level desired. Divide the \fRaxis.\fIN\fR.jog-scale\fR values by \fBscale\fR. .SH FUNCTIONS .TP \fBilowpass.\fIN\fB\fR (requires a floating-point thread) Update the output based on the input and parameters. .SH PINS .TP .B ilowpass.\fIN\fB.in\fR s32 in \fR .br .ns .TP .B ilowpass.\fIN\fB.out\fR s32 out \fR \fBout\fR tracks \fBin\fR*\fBscale\fR through a low-pass filter of \fBgain\fR per period. .SH PARAMETERS .TP .B ilowpass.\fIN\fB.scale\fR float rw \fR(default: \fI1024\fR) A scale factor applied to the output value of the low-pass filter. .TP .B ilowpass.\fIN\fB.gain\fR float rw \fR(default: \fI.5\fR) Together with the period, sets the rate at which the output changes. Useful range is between 0 and 1, with higher values causing the input value to be tracked more quickly. For instance, a setting of 0.9 causes the output value to go 90% of the way towards the input value in each period. .SH AUTHOR Jeff Epler .SH LICENSE GPL