Machinekit

Machinekit

Machinekit Documentation

HAL Component — MUX16V2

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

mux16v2 — Select from one of sixteen input values

SYNOPSIS

mux16v2

USAGE SYNOPSIS

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

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

DESCRIPTION

pin_ptr in bit use_graycode This signifies the input will use Gray code instead of binary. Gray code is a good choice when using physical switches because for each increment only one select input changes at a time.

pin_ptr in bit suppress_no_input This suppresses changing the output if all select lines are false. This stops unwanted jumps in output between transitions of input. but make in00 unavaliable.

pin_ptr in float debounce_time sets debouce time in seconds. eg. .10 = a tenth of a second input must be stable this long before outputs changes. This helps to ignore 'noisy' switches.

pin_ptr in bit sel#[4] Together, these determine which \fBin\fIN\fR value is copied to \fBout\fR.

pin_ptr out float out_f pin_ptr out s32 out_s Follows the value of one of the \fBin\fIN\fR values according to the four \fBsel\fR values and whether use-graycode is active.

The s32 value will be trunuated and limited to the max and min values of signed values. .RS .TP \fBsel3=false\fR, \fBsel2=false\fR, \fBsel1=false\fR, \fBsel0=false\fR \fBout\fR follows \fBin0\fR .TP \fBsel3=false\fR, \fBsel2=false\fR, \fBsel1=false\fR, \fBsel0=true\fR \fBout\fR follows \fBin1\fR .TP etc. .RE

FUNCTIONS

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

PINS

LICENCE

GPL