Machinekit

Machinekit

Machinekit Documentation

HAL Component — WCOMPN

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

wcompn — N-range window comparator

SYNOPSIS

wcompn

USAGE SYNOPSIS

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

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

FUNCTIONS

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

PINS

wcompn.N.in float in ( OR <newinstname>.in float in ) - Value being compared

wcompn.N.value%01d float in (M=0..pincount) ( OR <newinstname>.value%01d float in (M=0..pincount) ) - Boundary N for comparison

wcompn.N.default-out s32 in (default: -1) ( OR <newinstname>.default-out s32 in (default: -1) ) - Default output value when input is not in range

wcompn.N.out s32 out ( OR <newinstname>.out s32 out ) - Returns the index of the window the \fBin\fR is currently in

wcompn.N.under bit out ( OR <newinstname>.under bit out ) - True if \fBin\fR is less than \fBvalue0\fR

wcompn.N.over bit out ( OR <newinstname>.over bit out ) - True if \fBin\fR is greater than or equal to \fvalue<N-1>\fR

wcompn.N.in-range bit out ( OR <newinstname>.in-range bit out ) - True if \fBin\fR is strictly between \fBvalue0\fR and \fBvalue<N-1>\fR

INST_PARAMETERS

pincount int (default: 2)

NOTES

If \fBmax\fR ⇐ \fBmin\fR or \fBvalue<x>\fR are not in ascending orderthen the behavior is undefined.

LICENCE

GPL