Machinekit

Machinekit

Machinekit Documentation

HAL Component — LINCURVEV2

INSTANTIABLE COMPONENTS — General

All instantiable components can be loaded in two manners

Using loadrt with or without count= | names= parameters as per legacy components
Using newinst, which names the instance and allows further parameters and arguments
primarily pincount= which can set the number of pins created for that instance (where applicable)

NAME

lincurvev2 — one-dimensional lookup table

SYNOPSIS

lincurvev2

USAGE SYNOPSIS

loadrt lincurvev2
OR
newinst lincurvev2 <newinstname> [ pincount=N | iprefix=prefix ] [instanceparamX=X | argX=X ]

( args in [ ] denote possible args and parameters, may not be used in all components )

DESCRIPTION

Performs a 1-dimensional lookup and interpolation. The x-val parameters must be monotonic, though identical adjacent values are allowed. (for example 0,0,0,10) for a 4-element curve.

For input values less than the x-val-00 breakpoint the y-val-00 is returned. For x greater than the largest x-val-NN the yval corresponding to x-max is returned (ie, no extrapolation is performed.)

Sample usage: loadrt lincurve-inst newinst lincurve newone pincount=4 iprefix=lincurve4 for a 4-element curve.

The axis breakpoints should be set in the lincurve.x-val-NN parameters using "setp", as should the corresponding y values.

FUNCTIONS

lincurvev2.N.funct ( OR <newinstname>.funct (requires a floating-point thread) )

PINS

INST_PARAMETERS

pincount int (default: 4)

AUTHOR

Andy Pugh

LICENCE

GPL