Machinekit

Machinekit

Machinekit Documentation

HAL Component — LIMIT3

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

limit3 — Follow input signal while obeying limits

SYNOPSIS

Limit the output signal to fall between min and max, limit its slew rate to less than maxv per second, and limit its second derivative to less than maxa per second squared. When the signal is a position, this means that the position, velocity, and acceleration are limited.

USAGE SYNOPSIS

Limit the output signal to fall between min and max, limit its slew rate to less than maxv per second, and limit its second derivative to less than maxa per second squared. When the signal is a position, this means that the position, velocity, and acceleration are limited.

FUNCTIONS

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

PINS

limit3.N.in float in ( OR <newinstname>.in float in )

limit3.N.out float out ( OR <newinstname>.out float out )

limit3.N.load bit in (default: 0) ( OR <newinstname>.load bit in (default: 0) ) - When TRUE, immediately set \fBout\fB to \fBin\fR, ignoring maxv and maxa

limit3.N.min float in (default: -1e20) ( OR <newinstname>.min float in (default: -1e20) )

limit3.N.max float in (default: 1e20) ( OR <newinstname>.max float in (default: 1e20) )

limit3.N.maxv float in (default: 1e20) ( OR <newinstname>.maxv float in (default: 1e20) )

limit3.N.maxa float in (default: 1e20) ( OR <newinstname>.maxa float in (default: 1e20) )

limit3.N.smooth-steps u32 in (default: 2) ( OR <newinstname>.smooth-steps u32 in (default: 2) ) - Smooth out acceleration this many periods before reaching input or max/min limit. Higher values avoid oscillation, but will accelerate slightly more slowly.

LICENCE

GPL