Machinekit

Machinekit

Machinekit Documentation

HAL Component — DIV2

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

div2 — Quotient of two inputs

SYNOPSIS

The output will be quotient of the two inputs, ie \fBout\fR = \fBin0\fR/\fBin1\fR. The parameter \fBdeadband\fR can be used to control how close to 0 the denominator can be before the output is clamped to 0. \fBdeadband\fR must be at least 1e-8, and must be positive.

USAGE SYNOPSIS

The output will be quotient of the two inputs, ie \fBout\fR = \fBin0\fR/\fBin1\fR. The parameter \fBdeadband\fR can be used to control how close to 0 the denominator can be before the output is clamped to 0. \fBdeadband\fR must be at least 1e-8, and must be positive.

FUNCTIONS

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

PINS

div2.N.in0 float in ( OR <newinstname>.in0 float in ) - dividend

div2.N.in1 float in ( OR <newinstname>.in1 float in ) - divisor

div2.N.out float out ( OR <newinstname>.out float out ) - out = in0 / in1

div2.N.deadband float io ( OR <newinstname>.deadband float io ) - The \fBout\fR will be zero if \fBin1\fR is between -\fBdeadband\fR and +\fBdeadband\fR

LICENCE

GPL