Machinekit

Machinekit

Machinekit Documentation

HAL Component — SUM2

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

sum2 — Sum of two inputs (each with a gain) and an offset

SYNOPSIS

sum2

USAGE SYNOPSIS

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

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

FUNCTIONS

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

PINS

sum2.N.in0 float in ( OR <newinstname>.in0 float in )

sum2.N.in1 float in ( OR <newinstname>.in1 float in )

sum2.N.gain0 float io (default: 1.0) ( OR <newinstname>.gain0 float io (default: 1.0) )

sum2.N.gain1 float io (default: 1.0) ( OR <newinstname>.gain1 float io (default: 1.0) )

sum2.N.offset float io ( OR <newinstname>.offset float io )

sum2.N.out float out ( OR <newinstname>.out float out ) - out = in0 * gain0 + in1 * gain1 + offset

LICENCE

GPL