plasmac

title: plasmac(9)

summary: A plasma cutter controller

text:
# plasmac(9)

## NAME
plasmac - A plasma cutter controller

## SYNOPSIS
loadrt plasmac

## DESCRIPTION
A plasma cutting table control component for use with the LinuxCNC V2.8 or later.

VERSION:

1.238

SUMMARY:

Usage of this component is demonstrated in the QtPlasmaC example configurations included with LinuxCNC.

DISCLAIMER:

THE AUTHOR OF THIS SOFTWARE ACCEPTS ABSOLUTELY NO LIABILITY FOR ANY HARM OR LOSS RESULTING FROM ITS USE.

IT IS EXTREMELY UNWISE TO RELY ON SOFTWARE ALONE FOR SAFETY.

Any machinery capable of harming persons must have provisions for completely stopping all motors and moving parts etc. before persons enter any danger area.

All machinery must be designed to comply with local and national safety codes, and the author of this software can not, and does not, take any responsibility for such compliance.

## FUNCTIONS
plasmac (requires a floating-point thread)

## PINS
plasmac.arc-fail-delay float in

arc start failure timeout (seconds)

plasmac.arc-lost-delay float in

arc lost delay during a cut (seconds)

plasmac.arc-ok-high float in

maximum voltage level for Arc OK signal [mode 0] (volts)

plasmac.arc-ok-in bit in

external arc ok input signal [mode 1 & mode 2]

plasmac.arc-ok-low float in

minimum voltage level for Arc OK signal [mode 0] (volts)

plasmac.arc-max-starts s32 in

maximum attempts at starting the arc

plasmac.arc-voltage-in float in

arc voltage input [mode 0 & mode 1] see Notes above

plasmac.arc-voltage-offset float in

offset to set arc voltage to 0 at 0 volts

plasmac.arc-voltage-scale float in

scale to convert arc_voltage input to actual volts

plasmac.thc-auto bit in

enable automatic thc activation

plasmac.axis-x-max-limit float in

axis x maximum limit, connect to ini.x.max-limit

plasmac.axis-x-min-limit float in

axis x minimum limit, connect to ini.x.min-limit

plasmac.axis-x-position float in

current x axis position, connect to axis.x.pos-cmd

plasmac.axis-y-max-limit float in

axis y maximum limit, connect to ini.y.max-limit

plasmac.axis-y-min-limit float in

axis y minimum limit, connect to ini.y.min-limit

plasmac.axis-y-position float in

current y axis position, connect to axis.y.pos-cmd

plasmac.axis-z-max-limit float in

axis z maximum limit, connect to ini.z.max-limit

plasmac.axis-z-min-limit float in

axis z minimum limit, connect to ini.z.min-limit

plasmac.axis-z-position float in

current z axis position, connect to joint.N.pos-fb

plasmac.breakaway bit in

torch breakaway switch (optional, see float_switch)

plasmac.consumable-change bit in

change consumables in torch

plasmac.cornerlock-enable bit in

enable corner lock

plasmac.cornerlock-threshold float in

corner lock threshold (% of requested feed rate), speeds below this disable THC

plasmac.current-velocity float in

current machine velocity, connect to motion.current-vel

plasmac.cut-feed-rate float in

cut feed rate from current material (machine units per minute)

plasmac.cut-height float in

cut height (machine units)

plasmac.cut-recovery bit in

recover from cut error

plasmac.cut-volts float in

cut voltage (volts)

plasmac.cutting-start bit in

start a new cut, connect to spindle.0.on

plasmac.debug-print bit in

if true will print state changes as a debug aid

plasmac.external-estop bit in

external E-stop input

plasmac.feed-override float in

feed override value from GUI (connect to halui.feed-override.value)

plasmac.feed-reduction float in

reduce adaptive feed to this percentage (connect to motion.analog-out-03)

plasmac.float-switch bit in

float switch input (can also act as breakaway if it actuates when torch breaks away)

plasmac.float-switch-travel float in

float switch travel (machine units)

plasmac.gcode-scale float in (default: 1)

current G-code scale

plasmac.height-override float in

height override adjustment (volts)

plasmac.height-per-volt float in

torch height change per volt (machine units)

plasmac.homed bit in

machine is homed

plasmac.ignore-arc-ok-0 bit in

don't require arc ok for start or cutting

plasmac.ignore-arc-ok-1 bit in

don't require arc ok for start or cutting

plasmac.kerf-width float in

placeholder for better G-code portability between GUIs

plasmac.override-jog bit in

override jog inhibit

plasmac.offset-set-probe bit in

deploy probe for setting offsets

plasmac.offset-set-scribe bit in

deploy scribe for setting offsets

plasmac.laser-recovery-start s32 in

start laser offset for cut recovery

plasmac.laser-x-offset s32 in

alignment laser x axis offset (scaled units)

plasmac.laser-y-offset s32 in

alignment laser y axis offset (scaled units)

plasmac.lowpass-frequency float in

lowpass cutoff frequency for arc voltage output

plasmac.machine-is-on bit in

machine is on signal

plasmac.max-offset s32 in (default: 5)

maximum height offset

plasmac.mesh-arc-ok bit in (default: FALSE)

don't require arc ok for mesh mode

plasmac.mesh-enable bit in

enable mesh cutting mode

plasmac.mode s32 in

operating mode

plasmac.motion-type s32 in

motion type, connect to motion.motion-type

plasmac.move-down bit in

external thc down switch [mode 2]

plasmac.move-up bit in

external thc up switch [mode 2]

plasmac.multi-tool bit in (default: 1)

allows the use of multiple tools

plasmac.offset-probe-delay float in

wait for probe to deploy (seconds)

plasmac.offset-probe-x float in

X axis offset for offset probe (machine units)

plasmac.offset-probe-y float in

Y axis offset for offset probe (machine units)

plasmac.offsets-active bit in

offsets are active, connect to motion.eoffsets-active

plasmac.ohmic-sense-on-delay s32 in (default: 3)

debounce cycles for ohmic sense on

plasmac.ohmic-sense-off-delay s32 in (default: 3)

debounce cycles for ohmic sense off

plasmac.ohmic-sense-in bit in

ohmic sense relay input

plasmac.ohmic-max-attempts s32 in

maximum ohmic probe attempts before fallback to float switch

plasmac.ohmic-probe bit in

ohmic probe input, from ohmic-sense-out or external component/pin

plasmac.ohmic-probe-enable bit in

enable ohmic probe

plasmac.ohmic-probe-offset float in

Z axis offset for ohmic probe (machine units)

plasmac.ohmic-test bit in

test for shorted torch

plasmac.ok-sample-counts s32 in (default: 10)

arc_ok number of valid samples required [mode 0]

plasmac.ok-sample-threshold float in (default: 10)

arc_ok maximum arc voltage deviation allowed [mode 0]

plasmac.pause-at-end float in

time to pause at end of cut

plasmac.paused-motion-speed float in

multiplier for speed of motion when paused, from -1 to 1

plasmac.pid-d-gain float in

derivative gain input [mode 0 & mode 1]

plasmac.pid-i-gain float in

integral gain input [mode 0 & mode 1]

plasmac.pid-p-gain float in

proportional gain input [mode 0 & mode 1]

plasmac.pierce-delay float in

time required to pierce stock (seconds)

plasmac.probe-feed-rate float in

probe down velocity (machine units per minute)

plasmac.probe-final-speed s32 in (default: 1)

final probe speed (steps per servo period)

plasmac.pierce-height float in

pierce height (machine units)

plasmac.probe-start-height float in

probe starting height

plasmac.probe-test bit in

probe test only

plasmac.program-is-idle bit in

program is idle, connect to halui.program.is-idle

plasmac.program-is-paused bit in

program is paused, connect to halui.program.is-paused

plasmac.program-is-running bit in

program is running, connect to halui.program.is-running

plasmac.puddle-jump-delay float in

Delay move from pierce height to cut height (seconds), leave disconnected if not required.

plasmac.puddle-jump-height float in

Puddle jump height (percentage of pierce height), leave disconnected if not required.

plasmac.requested-velocity float in

deprecated

plasmac.feed-upm float in

requested feed_rate, connect to motion.feed-upm to use as the default (G-code units per minute)

plasmac.resolution s32 in (default: 100)

multiplier for resolution of the offset counts

plasmac.restart-delay float in

time from arc failure till next restart attempt

plasmac.safe-height float in

requested safe traverse height (machine units)

plasmac.scribe-arm-delay float in

delay from scribe arm to scribe on

plasmac.scribe-on-delay float in

delay from scribe on to motion beginning

plasmac.scribe-start bit in

start a new scribe, connect to spindle.1.on

plasmac.setup-feed-rate float in

feed rate for moves to pierce and cut heights (machine units per minute)

plasmac.skip-ihs-distance float in

skip IHS if less than this distance from last cut

plasmac.spotting-start bit in

start a new spot, connect to spindle.2.on

plasmac.spotting-threshold float in

threshold voltage to start spotting delay

plasmac.spotting-time float in

torch off delay after spotting threshold reached

plasmac.thc-delay float in

delay from cut feed rate reached to THC activate (seconds) [non auto THC]

plasmac.thc-disable bit in

thc disable

plasmac.thc-enable bit in

enable/disable thc and set the IHS skip type

plasmac.thc-feed-rate float in

maximum feed rate for thc (machine units per minute)

plasmac.thc-sample-counts s32 in (default: 50)

thc number of valid samples required [auto THC]

plasmac.thc-sample-threshold float in (default: 1)

thc maximum arc voltage deviation allowed [auto THC]

plasmac.thc-threshold float in

thc threshold (volts), changes below this have no effect

plasmac.torch-enable bit in

enable torch

plasmac.torch-off bit in

turn torch off

plasmac.torch-pulse-start bit in

torch pulse start

plasmac.torch-pulse-time float in

torch pulse time (seconds)

plasmac.units-per-mm float in

for scale calcs, connect to halui.machine.units-per-mm

plasmac.use-auto-volts bit in

use calculated voltage for thc baseline

plasmac.voidlock-enable bit in

enable voidlock [mode 0 & mode 1]

plasmac.voidlock-on-cycles s32 in (default: 2)

number of sampling cycles to activate voidlock

plasmac.voidlock-off-cycles s32 in (default: 10)

number of sampling cycles to deactivate voidlock

plasmac.voidlock-slope s32 in (default: 500)

voidlock slope in volts per second

plasmac.x-offset s32 in

offset to apply to axis x for consumable change and cut recovery (scaled units)

plasmac.x-offset-current float in

current x axis offset, connect to axis.x.eoffset

plasmac.xy-feed-rate float in

feed-rate for consumable change

plasmac.y-offset s32 in

offset to apply to axis y for consumable change and cut recovery (scaled units)

plasmac.y-offset-current float in

current z axis offset, connect to axis.y.eoffset

plasmac.z-offset-current float in

current z axis offset, connect to axis.z.eoffset

plasmac.zero-window float in (default: 0.1)

sets window that voltage fluctuations show as zero (-0.1 to 0.1 at default value)

plasmac.adaptive-feed float out

for reverse-run, connect to motion.adaptive-feed

plasmac.arc-ok-out bit out

arc ok output

plasmac.arc-voltage-out float out

arc voltage output [mode 0 & mode 1]

plasmac.consumable-changing bit out

consumables are being changed

plasmac.cornerlock-is-locked bit out

corner locked indicator

plasmac.cut-length float out

length of current cut job

plasmac.cut-recovering bit out

recovering from cut error

plasmac.cut-time float out

cut time of current job

plasmac.cutting-stop bit out

stop manual cut, connect to halui.spindle.0.stop

plasmac.feed-hold bit out

feed hold, connect to motion.feed-hold

plasmac.jog-inhibit bit out

jog inhibit, connect to motion.jog-inhibit

plasmac.laser-recovery-state s32 out

laser recovery status

plasmac.led-down bit out

thc move down indicator

plasmac.led-up bit out

thc move up indicator

plasmac.offset-scale float out

offset scale, connect to axis.<x y z>.eoffset-scale

plasmac.ohmic-enable bit out

on only while probing

plasmac.ohmic-sense-out bit out

ohmic sense output state

plasmac.paused-motion bit out

paused motion flag, true when paused motion is active

plasmac.paused-time float out

paused time during current job

plasmac.pierce-count s32 out

number of pierce attempts (torch starts)

plasmac.probe-test-error bit out

minimum limit reached while probe testing

plasmac.probe-time float out

probe time of current job

plasmac.program-pause bit out

pause the current program, connect to halui.program.pause

plasmac.program-resume bit out

resume the currently paused program, connect to halui.program.resume

plasmac.program-run bit out

run the currently loaded program, connect to halui.program.run

plasmac.program-stop bit out

stop current program, connect to halui.program.stop

plasmac.rapid-time float out

rapid motion time of current job

plasmac.run-time float out

run time of current job

plasmac.safe-height-is-limited bit out

safe height is limited indicator

plasmac.sensor-active bit out

one of float, ohmic, or breakaway is detected

plasmac.scribe-arm bit out

arm the scribe

plasmac.scribe-on bit out

turn scribe on

plasmac.state-out s32 out

current state

plasmac.stop-type-out s32 out

current stop type

plasmac.thc-active bit out

thc status output

plasmac.thc-enabled bit out

thc is enabled

plasmac.torch-on bit out

turn torch on, connect to your torch on input

plasmac.torch-time float out

torch on time of current job

plasmac.voidlock-is-locked bit out

voidlock is locked indicator [mode 0 & mode 1]

plasmac.x-offset-counts s32 out

x offset for consumable change, connect to axis.x.eoffset-counts

plasmac.xy-offset-enable bit out

enable x and y offsets, connect to axis.<x & y>.eoffset-enable

plasmac.y-offset-counts s32 out

y offset for consumable change, connect to axis.y.eoffset-counts

plasmac.z-height float out

current z axis height relative to the probed zero height

plasmac.z-offset-counts s32 out

z offset for height control, connect to axis.z.eoffset-counts

plasmac.z-offset-enable bit out

enable z offsets, connect to axis.z.eoffset-enable

plasmac.z-relative float out

distance of Z from last probed height

plasmac.current-feed-rate float out

current feed rate per minute

plasmac.requested-feed-rate float out

requested feed rate

plasmac.low-cut-volts s32 in

low cut voltage threshold while thc active

plasmac.target-samples s32 in (default: 6)

number of samples for setting target_volts

plasmac.target-volts float out

target voltage for thc, set by arc voltage at cut height

## AUTHOR
Phillip A Carter & Gregory D Carl

## LICENSE
GPLv2 or greater


pumakins

package: linuxcnc

title: pumakins(9)

text:
# pumakins(9)

See the file man9/kins.9.

branch: sisyphus


pwmgen

title: pwmgen(9)

summary: software PWM/PDM generation

text:
# pwmgen(9)

## NAME
pwmgen - software PWM/PDM generation

## SYNOPSIS
loadrt pwmgen output_type=type0[,type1...]

## DESCRIPTION
pwmgen is used to generate PWM (pulse width modulation) or PDM (pulse density modulation) signals. The maximum PWM frequency and the resolution is quite limited compared to hardware-based approaches, but in many cases software PWM can be very useful. If better performance is needed, a hardware PWM generator is a better choice.

pwmgen supports a maximum of eight channels. The number of channels actually loaded depends on the number of type values given. The value of each type determines the outputs for that channel.

type 0: single output A single output pin, pwm, whose duty cycle is determined by the input value for positive inputs, and which is off (or at min-dc) for negative inputs.

Suitable for single ended circuits.

type 1: pwm/direction

Two output pins, pwm and dir. The duty cycle on pwm varies as a function of the input value. dir is low for positive inputs and high for negative inputs.

type 2: up/down

Two output pins, up and down. For positive inputs, the PWM/PDM waveform appears on up, while down is low. For negative inputs, the waveform appears on down, while up is low. Suitable for driving the two sides of an H-bridge to generate a bipolar output.

## FUNCTIONS
pwmgen.make-pulses (no floating-point)

Generates the actual PWM waveforms, using information computed by update. Must be called as frequently as possible, to maximize the attainable PWM frequency and resolution, and minimize jitter. Operates on all channels at once.

pwmgen.update (uses floating point)

Accepts an input value, performs scaling and limit checks, and converts it into a form usable by make-pulses for PWM/PDM generation. Can (and should) be called less frequently than make-pulses. Operates on all channels at once.

## PINS
pwmgen.N.enable bit in

Enables PWM generator N - when false, all pwmgen.N output pins are low.

pwmgen.N.value float in

Commanded value. When value = 0.0, duty cycle is 0%, and when value = ±scale, duty cycle is ± 100% (subject to min-dc and max-dc limitations).

pwmgen.N.pwm bit out (output types 0 and 1 only)

PWM/PDM waveform.

pwmgen.N.dir bit out (output type 1 only)

Direction output: low for forward, high for reverse.

pwmgen.N.up bit out (output type 2 only)

PWM/PDM waveform for positive input values, low for negative inputs.

pwmgen.N.down bit out (output type 2 only)

PWM/PDM waveform for negative input values, low for positive inputs.

pwmgen.N.curr-dc float out

The current duty cycle, after all scaling and limits have been applied. Range is from -1.0 to +1.0.

pwmgen.N.max-dc float in/out

The maximum duty cycle. A value of 1.0 corresponds to 100%. This can be useful when using transistor drivers with bootstrapped power supplies, since the supply requires some low time to recharge.

pwmgen.N.min-dc float in/out

The minimum duty cycle. A value of 1.0 corresponds to 100%. Note that when the pwm generator is disabled, the outputs are constantly low, regardless of the setting of min-dc.

pwmgen.N.scale float in/out

pwmgen.N.offset float in/out

These parameters provide a scale and offset from the value pin to the actual duty cycle. The duty cycle is calculated according to dc = (value/scale) + offset, with 1.0 meaning 100%.

pwmgen.N.pwm-freq float in/out

PWM frequency in Hz. The upper limit is half of the frequency at which make-pulses is invoked, and values above that limit will be changed to the limit. If dither-pwm is false, the value will be changed to the nearest integer submultiple of the make-pulses frequency. A value of zero produces Pulse Density Modulation instead of Pulse Width Modulation.

pwmgen.N.dither-pwm bit in/out

Because software-generated PWM uses a fairly slow timebase (several to many microseconds), it has limited resolution. For example, if make-pulses is called at a 20 kHz rate, and pwm-freq is 2 kHz, there are only 10 possible duty cycles. If dither-pwm is false, the commanded duty cycle will be rounded to the nearest of those values. Assuming value remains constant, the same output will repeat every PWM cycle. If dither-pwm is true, the output duty cycle will be dithered between the two closest values, so that the long-term average is closer to the desired level. dither-pwm has no effect if pwm-freq is zero (PDM mode), since PDM is an inherently dithered process.


radiobutton

title: radiobutton(9)

text:
# radiobutton(9)

## NAME
radiobutton - Select one from several outputs with momentary switches

## SYNOPSIS
loadrt radiobutton [count=N|names=name1[,name2...]] [personality=P1,P2,...]

## DESCRIPTION
This component creates personality inputs to select one of several outputs. When sel-N is momentarily set high then the corresponding bit output out-N will be set high and other outputs will be set low. Simultaneously the value on the pin input-N will be copied to the value pin. The selected pin will indicate which set of outputs is currently active. Note that channel-0 should be used to provide the default values.

## FUNCTIONS
radiobutton.N (requires a floating-point thread)

## PINS
radiobutton.N.sel-MM bit in (MM=00..personality)

Inputs to select a channel

radiobutton.N.out-MM bit out (MM=00..personality)

output selected

radiobutton.N.selected s32 out (default: 0)

indicates which output is currently active

radiobutton.N.input-MM float in (MM=00..personality)

Possible output values

radiobutton.N.value float out

currently-selected output value

## AUTHOR
Andy Pugh

## LICENSE
GPL 2+


rosekins

title: rosekins(9)

summary: Kinematics for a rose engine

text:
# rosekins(9)

## NAME
rosekins - Kinematics for a rose engine

## SYNOPSIS
loadrt rosekins

## KINEMATICS

joint_0 linear, transverse (perpendicular to spindle)

joint_1 linear, longitudinal (parallel to spindle identity to z)

joint_2 rotary, spindle (workholding, not tool holding, e.g. not a highspeed spindle)

## PINS
rosekins.revolutions float out

Count of crossings of the negative X axis. Clockwise crossings increment revolutions by 1, counterclockwise crossings decrement by 1.

rosekins.theta_degrees float out

Principal value for arctan(Y/X)

rosekins.bigtheta_degrees float out

Accumulated angle (theta + revolutions * 360)

## NOTES
Theta is the principal value of arctan(Y/X). Joint_2 angle values are not limited to principal values of arctan(Y/X) but accumulate continuously as the spindle is rotated. HAL pins are provided for the principal value and a count of the number of revolutions.

The transverse motion is exactly perpendicular to the spindle. In a traditional rose engine, the transverse motion is created by 'rocking' the headstock about a pivot. A typical pivot length combined with the limited amount of X travel in a real machine make the perpendicular approximation a reasonable model.


rotatekins

title: rotatekins(9)

text:
# rotatekins(9)

See the file man9/kins.9.


title: sample_hold(9)

summary: Sample and Hold

text:
# sample_hold(9)

## NAME
sample_hold - Sample and Hold

## SYNOPSIS
loadrt sample_hold [count=N|names=name1[,name2...]]

## FUNCTIONS
sample-hold.N (requires a floating-point thread)

## PINS
sample-hold.N.in s32 in

sample-hold.N.hold bit in

sample-hold.N.out s32 out

## SEE ALSO
tristate(9)

## AUTHOR
Stephen Wille Padnos

## LICENSE
GPL


sampler

title: sampler(9)

summary: sample data from HAL in real time

text:
# sampler(9)

## NAME
sampler - sample data from HAL in real time

## SYNOPSIS
loadrt sampler depth=depth1[,depth2...] cfg=string1[,string2...]

## DESCRIPTION
sampler and halsampler(1) are used together to sample HAL data in real time and store it in a file. sampler is a realtime HAL component that exports HAL pins and creates a FIFO in shared memory. It then begins sampling data from the HAL and storing it to the FIFO. halsampler is a non-realtime program that copies data from the FIFO to stdout, where it can be redirected to a file or piped to some other program.

## OPTIONS
depth=depth1[,depth2...]

sets the depth of the realtime->non-realtime FIFO that sampler creates to buffer the realtime data. Multiple values of depth (separated by commas) can be specified if you need more than one FIFO (for example if you want to sample data from two different realtime threads).

cfg=string1[,string2...]

defines the set of HAL pins that sampler exports and later samples data from. One string must be supplied for each FIFO, separated by commas. sampler exports one pin for each character in string. Legal characters are:

F, f (float pin)

B, b (bit pin)

S, s (s32 pin)

U, u (u32 pin)

## FUNCTIONS
sampler.N

One function is created per FIFO, numbered from zero.

## PINS
sampler.N.pin.M input

Pin for the data that will wind up in column M of FIFO N (and in column M of the output file). The pin type depends on the config string.

sampler.N.curr-depth s32 output

Current number of samples in the FIFO. When this reaches depth new data will begin overwriting old data, and some samples will be lost.

sampler.N.full bit output

TRUE when the FIFO N is full, FALSE when there is room for another sample.

sampler.N.enable bit input

When TRUE, samples are captured and placed in FIFO N, when FALSE, no samples are acquired. Defaults to TRUE.

## PARAMETERS
sampler.N.overruns s32 read/write

The number of times that sampler has tried to write data to the HAL pins but found no room in the FIFO. It increments whenever full is true, and can be reset by the setp command.

sampler.N.sample-num s32 read/write

A number that identifies the sample. It is automatically incremented for each sample, and can be reset using the setp command. The sample number can optionally be printed in the first column of the output from halsampler, using the -t option (see man 1 halsampler ).

## SEE ALSO
halsampler(1), streamer(9), halstreamer(1)

## AUTHOR
Original version by John Kasunich, as part of the LinuxCNC project. Improvements by several other members of the LinuxCNC development team.

## REPORTING BUGS
Report bugs at https://github.com/LinuxCNC/linuxcnc/issues

## COPYRIGHT
Copyright © 2006 John Kasunich.

This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


scale

title: scale(9)

text:
# scale(9)

## NAME
scale - LinuxCNC HAL component that applies a scale and offset to its input

## SYNOPSIS
loadrt scale [count=N|names=name1[,name2...]]

## FUNCTIONS
scale.N (requires a floating-point thread)

## PINS
scale.N.in float in

scale.N.gain float in

scale.N.offset float in

scale.N.out float out

out = in * gain + offset

## AUTHOR
Jeff Epler

## LICENSE
GPL


title: scaled_s32_sums(9)

summary: Sum of four inputs (each with a scale)

text:
# scaled_s32_sums(9)

## NAME
scaled_s32_sums - Sum of four inputs (each with a scale)

## SYNOPSIS
loadrt scaled_s32_sums [count=N|names=name1[,name2...]]

## FUNCTIONS
scaled-s32-sums.N (requires a floating-point thread)

## PINS
scaled-s32-sums.N.in0 s32 in

scaled-s32-sums.N.in1 s32 in

scaled-s32-sums.N.in2 s32 in

scaled-s32-sums.N.in3 s32 in

scaled-s32-sums.N.scale0 float in (default: 1.0)

scaled-s32-sums.N.scale1 float in (default: 1.0)

scaled-s32-sums.N.scale2 float in (default: 1.0)

scaled-s32-sums.N.scale3 float in (default: 1.0)

scaled-s32-sums.N.out-s s32 out

scaled-s32-sums.N.out-f float out

out-s = out-f = (in0 * scale0) + (in1 * scale1) + (in2 * scale2) + (in3 * scale3)

## SEE ALSO
sum2(9), weighted_sum(9)

## AUTHOR
Chris S Morley

## LICENSE
GPL


scarakins

title: scarakins(9)

text:
# scarakins(9)

See the file man9/kins.9.


title: select8(9)

summary: 8-bit binary match detector

text:
# select8(9)

## NAME
select8 - 8-bit binary match detector

## SYNOPSIS
loadrt select8 [count=N|names=name1[,name2...]]

## FUNCTIONS
select8.N (requires a floating-point thread)

## PINS
select8.N.enable bit in (default: TRUE)

Set enable to FALSE to cause all outputs to be set FALSE.

select8.N.sel s32 in

The number of the output to set TRUE. All other outputs well be set FALSE.

select8.N.outM bit out (M=0..7)

Output bits. If enable is set and the sel input is between 0 and 7, then the corresponding output bit will be set true.

## SEE ALSO
demux(9)

## AUTHOR
Stephen Wille Padnos

## LICENSE
GPL


serport

title: serport(9)

text:
# serport(9)

## NAME
serport - Hardware driver for the digital I/O bits of the 8250 and 16550 serial port.

## SYNOPSIS
loadrt serport io=addr[,addr...]

The pin numbers refer to the 9-pin serial pinout. Keep in mind that these ports generally use rs232 voltages, not 0/5V signals.

Specify the I/O address of the serial ports using the module parameter io=addr[,addr...]. These ports must not be in use by the kernel. To free up the I/O ports after bootup, install setserial and execute a command like:

sudo setserial /dev/ttyS0 uart none

but it is best to ensure that the serial port is never used or configured by the Linux kernel by setting a kernel commandline parameter or not loading the serial kernel module if it is a modularized driver.

## FUNCTIONS
serport.N.read (requires a floating-point thread)

serport.N.write (requires a floating-point thread)

## PINS
serport.N.pin-1-in bit out

Also called DCD (data carrier detect); pin 8 on the 25-pin serial pinout

serport.N.pin-6-in bit out

Also called DSR (data set ready); pin 6 on the 25-pin serial pinout

serport.N.pin-8-in bit out

Also called CTS (clear to send); pin 5 on the 25-pin serial pinout

serport.N.pin-9-in bit out

Also called RI (ring indicator); pin 22 on the 25-pin serial pinout

serport.N.pin-1-in-not bit out

Inverted version of pin-1-in

serport.N.pin-6-in-not bit out

Inverted version of pin-6-in

serport.N.pin-8-in-not bit out

Inverted version of pin-8-in

serport.N.pin-9-in-not bit out

Inverted version of pin-9-in

serport.N.pin-3-out bit in

Also called TX (transmit data); pin 2 on the 25-pin serial pinout

serport.N.pin-4-out bit in

Also called DTR (data terminal ready); pin 20 on the 25-pin serial pinout

serport.N.pin-7-out bit in

Also called RTS (request to send); pin 4 on the 25-pin serial pinout

## PARAMETERS
serport.N.pin-3-out-invert bit rw

serport.N.pin-4-out-invert bit rw

serport.N.pin-7-out-invert bit rw

serport.N.ioaddr u32 r

## LICENSE
GPL


setsserial

title: setsserial(9)

text:
# setsserial(9)

## NAME
setsserial - a utility for setting Smart Serial NVRAM parameters.

NOTE: This rather clunky utility is no longer needed except for flashing new smart-serial remote firmware. Smart-serial remote parameters can now be set in the HAL file in the normal way.

## SYNOPSIS
loadrt setsserial cmd="set hm2_8i20.001f.nvmaxcurrent 750"

## FUNCTIONS
None

## PINS
None

## USAGE
loadrt setsserial cmd="{command} {parameter/device} {value/filename}"

Commands available are set and flash.

This utility should be used under halcmd, without LinuxCNC running or any realtime threads running.

A typical command sequence would be:

halrun

loadrt hostmot2 use_serial_numbers=1

loadrt hm2_pci config="firmware=hm2/5i23/svss8_8.bit"

show param

loadrt setsserial cmd="set hm2_8i20.001f.nvmaxcurrent 750"

exit

This example uses the option to have the HAL pins and parameters labelled by the serial number of the remote. This is not necessary but can reduce the scope for confusion. (The serial number is normally on a sticker on the device.)

The next line loads the hm2_pci driver in the normal way. The hm2_7i43 driver should work equally well, as should any future 7i80 driver. If the card has already been strted up and a firmware has been loaded, then the config string may be omitted.

"show param" is optional, but provides a handy list of all the devices and parameters. It also shows the current values of the parameters which can be useful for determining scaling. u32 pin values are always shown in hex, but new values can be entered in decimal or hex. Use the Ox123ABC format to enter a hex value.

The next line invokes setsserial. This is run in a slightly strange way in order to have kernel-level access to a live Hostmot2 config. It is basically a HAL module that always fails to load. This may lead to error messages being printed to the `halcmd:` prompt. These can often be ignored. All the real feedback is via the dmesg command. It is suggested to have a second terminal window open to run dmesg after each command.

On exiting there will typically be a further error message related to the driver failing to unload setsserial. This can be ignored.

The parameter changes will not show up until the drivers are reloaded. //TODO// Add a "get" command to avoid this problem.

Flashing Firmware To flash new firmware to an FPGA card such as the 5i25 or 5i20 the "mesaflash" utility should be used. Setsserial is only useful for changing/updating the firmware on smart-serial remote such as the 8i20. The firmware should be placed somewhere in the /lib/firmware/hm2 tree, where the Linux firmware loading macros can find it.

The flashing routine operates in a realtime thread, and can only send prompts to the user through the kernel log (dmesg). It is most convenient to open two terminal windows, one for command entry and one to monitor progress.

In the first terminal enter

tail -f /var/log/kern.log

This terminal will now display status information.

The second window will be used to enter the commands. It is important that LinuxCNC and/or HAL are not already loaded when the process is started. To flash new firmware it is necessary to move a jumper on the smart-serial remote drive and to switch smart-serial communication to a slower baudrate.

A typical command sequence is then

halrun

loadrt hostmot2 sserial_baudrate=115200

loadrt hm2_pci config="firmware=hm2/5i23/svss8_8.bit"

loadrt setsserial cmd="flash hm2_5i23.0.8i20.0.1 hm2/8i20/8i20T.BIN"

exit

It is not necessary (or useful) to specify a config string in a system using the 5i25 or 6i25 cards.

Note that it is necessary to exit halrun and unload the realtime environment before flashing the next card (exit)

The correct sserial channel name to use can be seen in the dmesg output in the feedback terminal after the loadrt hm2_pci step of the sequence.

## LICENSE
GPL


siggen

title: siggen(9)

summary: signal generator

text:
# siggen(9)

## NAME
siggen - signal generator

## SYNOPSIS
loadrt siggen [num_chan=num | names=name1[,name2...]]

## DESCRIPTION
siggen is a signal generator that can be used for testing and other applications that need simple waveforms. It produces sine, cosine, triangle, sawtooth, and square waves of variable frequency, amplitude, and offset, which can be used as inputs to other HAL components.

siggen supports a maximum of sixteen channels. The number of channels actually loaded is set by the num_chan argument when the module is loaded. Alternatively, specify names= and unique names separated by commas.

The num_chan= and names= specifiers are mutually exclusive. If neither num_chan= nor names= are specified, the default value is one.

## NAMING
The names for pins, parameters, and functions are prefixed as:

siggen.N. for N=0,1,...,num-1 when using num_chan=num

nameN. for nameN=name1,name2,... when using names=name1,name2,...

The siggen.N. format is shown in the following descriptions.

## FUNCTIONS
siggen.N.update (uses floating-point)

Updates output pins for signal generator N. Each time it is called it calculates a new sample. It should be called many times faster than the desired signal frequency, to avoid distortion and aliasing.

## PINS
siggen.N.frequency float in

The output frequency for signal generator N, in Hertz. The default value is 1.0 Hertz.

siggen.N.amplitude float in

The output amplitude for signal generator N. If offset is zero, the outputs will swing from -amplitude to +amplitude. The default value is 1.00.

siggen.N.offset float in

The output offset for signal generator N. This value is added directly to the output signal. The default value is zero.

siggen.N.reset bit in

Resets output pins to pretermined states:

sine 0

sawtooth 0

square -1 * amplitude

cosine -1 * amplitude

triangle -1 * amplitude

siggen.N.clock bit out

The clock output. Bit type clock signal output at the commanded frequency.

siggen.N.square float out

The square wave output. Positive while triangle and cosine are ramping upwards, and while sine is negative.

siggen.N.sine float out

The sine output. Lags cosine by 90 degrees.

siggen.N.cosine float out

The cosine output. Leads sine by 90 degrees.

siggen.N.triangle float out

The triangle wave output. Ramps up while square is positive, and down while square is negative. Reaches its positive and negative peaks at the same time as cosine.

siggen.N.sawtooth float out

The sawtooth output. Ramps upwards to its positive peak, then instantly drops to its negative peak and starts ramping again. The drop occurs when triangle and cosine are at their positive peaks, and coincides with the falling edge of square.

## PARAMETERS
None


title: sim_axis_hardware(9)

text:
# sim_axis_hardware(9)

## NAME
sim_axis_hardware - A component to simulate home and limit switches

## SYNOPSIS
loadrt sim_axis_hardware [count=N|names=name1[,name2...]]

## DESCRIPTION
This component creates simulated home and limit switches based on the current position.

It currently can supply simulation for X, tandem X, Y, tandem Y, Z, U, V, and A axes.

## FUNCTIONS
sim-axis-hardware.N.update (requires a floating-point thread)

## PINS
sim-axis-hardware.N.Xcurrent-pos float in

The current position on the axis - eg connect to joint.0.motor-pos-fb

sim-axis-hardware.N.X2current-pos float in

sim-axis-hardware.N.Ycurrent-pos float in

sim-axis-hardware.N.Y2current-pos float in

sim-axis-hardware.N.Zcurrent-pos float in

sim-axis-hardware.N.Acurrent-pos float in

sim-axis-hardware.N.Ucurrent-pos float in

sim-axis-hardware.N.Vcurrent-pos float in

sim-axis-hardware.N.Xhomesw-pos float in (default: 1)

The position of the home switch

sim-axis-hardware.N.X2homesw-pos float in (default: 1)

sim-axis-hardware.N.Yhomesw-pos float in (default: 1)

sim-axis-hardware.N.Y2homesw-pos float in (default: 1)

sim-axis-hardware.N.Zhomesw-pos float in (default: 1)

sim-axis-hardware.N.Ahomesw-pos float in (default: 1)

sim-axis-hardware.N.Uhomesw-pos float in (default: 1)

sim-axis-hardware.N.Vhomesw-pos float in (default: 1)

sim-axis-hardware.N.Xmaxsw-upper float in

The upper range of the maximum limit switch, above this is false.

sim-axis-hardware.N.X2maxsw-upper float in

sim-axis-hardware.N.Ymaxsw-upper float in

sim-axis-hardware.N.Y2maxsw-upper float in

sim-axis-hardware.N.Zmaxsw-upper float in

sim-axis-hardware.N.Amaxsw-upper float in

sim-axis-hardware.N.Umaxsw-upper float in

sim-axis-hardware.N.Vmaxsw-upper float in

sim-axis-hardware.N.Xmaxsw-lower float in

The lower range of the maximum limit switch, below this is false.

sim-axis-hardware.N.X2maxsw-lower float in

sim-axis-hardware.N.Ymaxsw-lower float in

sim-axis-hardware.N.Y2maxsw-lower float in

sim-axis-hardware.N.Zmaxsw-lower float in

sim-axis-hardware.N.Amaxsw-lower float in

sim-axis-hardware.N.Umaxsw-lower float in

sim-axis-hardware.N.Vmaxsw-lower float in

sim-axis-hardware.N.Xminsw-upper float in

The upper range of the minimum limit switch, above this is false.

sim-axis-hardware.N.X2minsw-upper float in

sim-axis-hardware.N.Yminsw-upper float in

sim-axis-hardware.N.Y2minsw-upper float in

sim-axis-hardware.N.Zminsw-upper float in

sim-axis-hardware.N.Aminsw-upper float in

sim-axis-hardware.N.Uminsw-upper float in

sim-axis-hardware.N.Vminsw-upper float in

sim-axis-hardware.N.Xminsw-lower float in

The lower range of the minimum limit switch, below this is false.

sim-axis-hardware.N.X2minsw-lower float in

sim-axis-hardware.N.Yminsw-lower float in

sim-axis-hardware.N.Y2minsw-lower float in

sim-axis-hardware.N.Zminsw-lower float in

sim-axis-hardware.N.Aminsw-lower float in

sim-axis-hardware.N.Uminsw-lower float in

sim-axis-hardware.N.Vminsw-lower float in

sim-axis-hardware.N.Xhomesw-hyst float in (default: .025)

range that home switch will be true +- half this to the home position

sim-axis-hardware.N.X2homesw-hyst float in (default: .025)

sim-axis-hardware.N.Yhomesw-hyst float in (default: .025)

sim-axis-hardware.N.Y2homesw-hyst float in (default: .025)

sim-axis-hardware.N.Zhomesw-hyst float in (default: .025)

sim-axis-hardware.N.Ahomesw-hyst float in (default: .025)

sim-axis-hardware.N.Uhomesw-hyst float in (default: .025)

sim-axis-hardware.N.Vhomesw-hyst float in (default: .025)

sim-axis-hardware.N.Xhoming bit in

True is homing in progress

sim-axis-hardware.N.X2homing bit in

sim-axis-hardware.N.Yhoming bit in

sim-axis-hardware.N.Y2homing bit in

sim-axis-hardware.N.Zhoming bit in

sim-axis-hardware.N.Ahoming bit in

sim-axis-hardware.N.Uhoming bit in

sim-axis-hardware.N.Vhoming bit in

sim-axis-hardware.N.Xhomesw-out bit out

Home switch for the X axis

sim-axis-hardware.N.X2homesw-out bit out

sim-axis-hardware.N.Yhomesw-out bit out

sim-axis-hardware.N.Y2homesw-out bit out

sim-axis-hardware.N.Zhomesw-out bit out

sim-axis-hardware.N.Ahomesw-out bit out

sim-axis-hardware.N.Uhomesw-out bit out

sim-axis-hardware.N.Vhomesw-out bit out

sim-axis-hardware.N.homesw-all bit out

sim-axis-hardware.N.Xmaxsw-out bit out

Max limit switch

sim-axis-hardware.N.Xminsw-out bit out

min limit switch

sim-axis-hardware.N.Xbothsw-out bit out

True for both max and min limit switch

sim-axis-hardware.N.X2maxsw-out bit out

sim-axis-hardware.N.X2minsw-out bit out

sim-axis-hardware.N.X2bothsw-out bit out

sim-axis-hardware.N.Ymaxsw-out bit out

sim-axis-hardware.N.Yminsw-out bit out

sim-axis-hardware.N.Ybothsw-out bit out

sim-axis-hardware.N.Y2maxsw-out bit out

sim-axis-hardware.N.Y2minsw-out bit out

sim-axis-hardware.N.Y2bothsw-out bit out

sim-axis-hardware.N.Zmaxsw-out bit out

sim-axis-hardware.N.Zminsw-out bit out

sim-axis-hardware.N.Zbothsw-out bit out

sim-axis-hardware.N.Amaxsw-out bit out

sim-axis-hardware.N.Aminsw-out bit out

sim-axis-hardware.N.Abothsw-out bit out

sim-axis-hardware.N.Umaxsw-out bit out

sim-axis-hardware.N.Uminsw-out bit out

sim-axis-hardware.N.Ubothsw-out bit out

sim-axis-hardware.N.Vmaxsw-out bit out

sim-axis-hardware.N.Vminsw-out bit out

sim-axis-hardware.N.Vbothsw-out bit out

sim-axis-hardware.N.limitsw-all bit out

sim-axis-hardware.N.limitsw-homesw-all bit out

True for all limits and all home.

sim-axis-hardware.N.Xmaxsw-homesw-out bit out

sim-axis-hardware.N.Xminsw-homesw-out bit out

sim-axis-hardware.N.Xbothsw-homesw-out bit out

sim-axis-hardware.N.X2maxsw-homesw-out bit out

sim-axis-hardware.N.X2minsw-homesw-out bit out

sim-axis-hardware.N.X2bothsw-homesw-out bit out

sim-axis-hardware.N.Ymaxsw-homesw-out bit out

sim-axis-hardware.N.Yminsw-homesw-out bit out

sim-axis-hardware.N.Ybothsw-homesw-out bit out

sim-axis-hardware.N.Y2maxsw-homesw-out bit out

sim-axis-hardware.N.Y2minsw-homesw-out bit out

sim-axis-hardware.N.Y2bothsw-homesw-out bit out

sim-axis-hardware.N.Zmaxsw-homesw-out bit out

sim-axis-hardware.N.Zminsw-homesw-out bit out

sim-axis-hardware.N.Zbothsw-homesw-out bit out

sim-axis-hardware.N.Amaxsw-homesw-out bit out

sim-axis-hardware.N.Aminsw-homesw-out bit out

sim-axis-hardware.N.Abothsw-homesw-out bit out

sim-axis-hardware.N.Umaxsw-homesw-out bit out

sim-axis-hardware.N.Uminsw-homesw-out bit out

sim-axis-hardware.N.Ubothsw-homesw-out bit out

sim-axis-hardware.N.Vmaxsw-homesw-out bit out

sim-axis-hardware.N.Vminsw-homesw-out bit out

sim-axis-hardware.N.Vbothsw-homesw-out bit out

sim-axis-hardware.N.limit-offset float in (default: .01)

how much the limit switches are offset from inputted position. added to max, subtracted from min

## AUTHOR
Chris S Morley

## LICENSE
GPL


title: sim_encoder(9)

summary: simulated quadrature encoder

text:
# sim_encoder(9)

## NAME
sim_encoder - simulated quadrature encoder

## SYNOPSIS
loadrt sim_encoder [num_chan=num | names=name1[,name2...]]

## DESCRIPTION
sim_encoder can generate quadrature signals as if from an encoder. It also generates an index pulse once per revolution. It is mostly used for testing and simulation, to replace hardware that may not be available. It has a limited maximum frequency, as do all software based pulse generators.

sim_encoder supports a maximum of eight channels. The number of channels actually loaded is set by the num_chan= argument when the module is loaded. Alternatively, specify names= and unique names separated by commas.

The num_chan= and names= specifiers are mutually exclusive. If neither num_chan= nor names= are specified, the default value is one.

## FUNCTIONS
sim-encoder.make-pulses (no floating-point)

Generates the actual quadrature and index pulses. Must be called as frequently as possible, to maximize the count rate and minimize jitter. Operates on all channels at once.

sim-encoder.update-speed (uses floating-point)

Reads the speed command and other parameters and converts the data into a form that can be used by make-pulses. Changes take effect only when update-speed runs. Can (and should) be called less frequently than make-pulses. Operates on all channels at once.

## NAMING
The names for pins and parameters are prefixed as:

sim-encoder.N. for N=0,1,...,num-1 when using num_chan=num

nameN. for nameN=name1,name2,... when using names=name1,name2,...

The sim-encoder.N. format is shown in the following descriptions.

## PINS
sim-encoder.N.phase-A bit out

One of the quadrature outputs.

sim-encoder.N.phase-B bit out

The other quadrature output.

sim-encoder.N.phase-Z bit out

The index pulse.

sim-encoder.N.speed float in

The desired speed of the encoder, in user units per per second. This is divided by scale, and the result is used as the encoder speed in revolutions per second.

## PARAMETERS
sim-encoder.N.ppr u32 rw

The pulses per revolution of the simulated encoder. Note that this is pulses, not counts, per revolution (ppr). Each pulse or cycle from the encoder results in four counts, because every edge is counted. Default value is 100 ppr, or 400 counts per revolution.

sim-encoder.N.scale float rw

Scale factor for the speed input. The speed value is divided by scale to get the actual encoder speed in revolutions per second. For example, if scale is set to 60, then speed is in revolutions per minute (RPM) instead of revolutions per second. The default value is 1.00.


title: sim_home_switch(9)

summary: Home switch simulator

text:
# sim_home_switch(9)

## NAME
sim_home_switch - Home switch simulator

## SYNOPSIS
loadrt sim_home_switch [count=N|names=name1[,name2...]]

## DESCRIPTION
After tripping home switch, travel in opposite direction is required (amount set by the hysteresis pin). A pin (index-enable) is provided for use when [JOINT_n]HOME_USE_INDEX is specified to reset the I/O pin joint.N.index-enable.

## FUNCTIONS
sim-home-switch.N (requires a floating-point thread)

## PINS
sim-home-switch.N.cur-pos float in

Current position (typically: joint.n.motor-pos-fb)

sim-home-switch.N.home-pos float in (default: 1)

Home switch position

sim-home-switch.N.hysteresis float in (default: 0.1)

Travel required to backoff (hysteresis)

sim-home-switch.N.home-sw bit out

Home switch activated

sim-home-switch.N.index-enable bit io

typ: connect to joint.N.index-enable

sim-home-switch.N.index-delay-ms float in (default: 10)

delay in msec to reset index-enable

## AUTHOR
Dewey Garrett

## LICENSE
GPL


title: sim_matrix_kb(9)

summary: convert HAL pin inputs to keycodes

text:
# sim_matrix_kb(9)

## NAME
sim_matrix_kb - convert HAL pin inputs to keycodes

## SYNOPSIS
loadrt sim_matrix_kb [count=N|names=name1[,name2...]]

## FUNCTIONS
sim-matrix-kb.N (requires a floating-point thread)

## PINS
sim-matrix-kb.N.out u32 out

pin that outputs the Keycode

sim-matrix-kb.N.button.c00.rMM bit in (MM=00..07)

array of inputs

sim-matrix-kb.N.button.c01.rMM bit in (MM=00..07)

array of inputs

sim-matrix-kb.N.button.c02.rMM bit in (MM=00..07)

array of inputs

sim-matrix-kb.N.button.c03.rMM bit in (MM=00..07)

array of inputs

sim-matrix-kb.N.button.c04.rMM bit in (MM=00..07)

array of inputs

sim-matrix-kb.N.button.c05.rMM bit in (MM=00..07)

array of inputs

sim-matrix-kb.N.button.c06.rMM bit in (MM=00..07)

array of inputs

sim-matrix-kb.N.button.c07.rMM bit in (MM=00..07)

array of inputs

## AUTHOR
Chris S Morley

## LICENSE
GPL


title: sim_parport(9)

text:
# sim_parport(9)

## NAME
sim_parport - A component to simulate the pins of the hal_parport component

## SYNOPSIS
loadrt sim_parport [count=N|names=name1[,name2...]]

## DESCRIPTION
Sim_parport is used to replace the pins of a real parport without changing any of the pins names in the rest of the config.

It has pass-through pins (ending in -fake) that allows connecting to other components.

eg pin-02-in will follow pin-02-in-fake 's logic.

pin_01_out-fake will follow pin_01_out (possibly modified by pin_01_out-invert)

It creates all possible pins of both 'in' and 'out' options of the hal_parport component.

This allows using other hardware I/O in place of the parport (without having to change the rest of the config)

or simulating hardware such as limit switches.

it's primary use is in Stepconf for building simulated configs.

You must use the names= option to have the right pin names.

eg. names=parport.0,parport.1

The read and write functions pass the logic from pins to fake pins or vice vera

The reset function is a no operation.

## FUNCTIONS
sim-parport.N.read (requires a floating-point thread)

sim-parport.N.write (requires a floating-point thread)

sim-parport.N.reset (requires a floating-point thread)

## PINS
sim-parport.N.pin-01-out bit in

sim-parport.N.pin-02-out bit in

sim-parport.N.pin-03-out bit in

sim-parport.N.pin-04-out bit in

sim-parport.N.pin-05-out bit in

sim-parport.N.pin-06-out bit in

sim-parport.N.pin-07-out bit in

sim-parport.N.pin-08-out bit in

sim-parport.N.pin-09-out bit in

sim-parport.N.pin-14-out bit in

sim-parport.N.pin-16-out bit in

sim-parport.N.pin-17-out bit in

sim-parport.N.pin-01-out-fake bit out

sim-parport.N.pin-02-out-fake bit out

sim-parport.N.pin-03-out-fake bit out

sim-parport.N.pin-04-out-fake bit out

sim-parport.N.pin-05-out-fake bit out

sim-parport.N.pin-06-out-fake bit out

sim-parport.N.pin-07-out-fake bit out

sim-parport.N.pin-08-out-fake bit out

sim-parport.N.pin-09-out-fake bit out

sim-parport.N.pin-14-out-fake bit out

sim-parport.N.pin-16-out-fake bit out

sim-parport.N.pin-17-out-fake bit out

sim-parport.N.pin-02-in bit out

sim-parport.N.pin-03-in bit out

sim-parport.N.pin-04-in bit out

sim-parport.N.pin-05-in bit out

sim-parport.N.pin-06-in bit out

sim-parport.N.pin-07-in bit out

sim-parport.N.pin-08-in bit out

sim-parport.N.pin-09-in bit out

sim-parport.N.pin-10-in bit out

sim-parport.N.pin-11-in bit out

sim-parport.N.pin-12-in bit out

sim-parport.N.pin-13-in bit out

sim-parport.N.pin-15-in bit out

sim-parport.N.pin-02-in-fake bit in

sim-parport.N.pin-03-in-fake bit in

sim-parport.N.pin-04-in-fake bit in

sim-parport.N.pin-05-in-fake bit in

sim-parport.N.pin-06-in-fake bit in

sim-parport.N.pin-07-in-fake bit in

sim-parport.N.pin-08-in-fake bit in

sim-parport.N.pin-09-in-fake bit in

sim-parport.N.pin-10-in-fake bit in

sim-parport.N.pin-11-in-fake bit in

sim-parport.N.pin-12-in-fake bit in

sim-parport.N.pin-13-in-fake bit in

sim-parport.N.pin-15-in-fake bit in

sim-parport.N.pin-02-in-not bit out

sim-parport.N.pin-03-in-not bit out

sim-parport.N.pin-04-in-not bit out

sim-parport.N.pin-05-in-not bit out

sim-parport.N.pin-06-in-not bit out

sim-parport.N.pin-07-in-not bit out

sim-parport.N.pin-08-in-not bit out

sim-parport.N.pin-09-in-not bit out

sim-parport.N.pin-10-in-not bit out

sim-parport.N.pin-11-in-not bit out

sim-parport.N.pin-12-in-not bit out

sim-parport.N.pin-13-in-not bit out

sim-parport.N.pin-15-in-not bit out

sim-parport.N.reset-time float in

## PARAMETERS
sim-parport.N.pin-01-out-invert bit rw

sim-parport.N.pin-02-out-invert bit rw

sim-parport.N.pin-03-out-invert bit rw

sim-parport.N.pin-04-out-invert bit rw

sim-parport.N.pin-05-out-invert bit rw

sim-parport.N.pin-06-out-invert bit rw

sim-parport.N.pin-07-out-invert bit rw

sim-parport.N.pin-08-out-invert bit rw

sim-parport.N.pin-09-out-invert bit rw

sim-parport.N.pin-14-out-invert bit rw

sim-parport.N.pin-16-out-invert bit rw

sim-parport.N.pin-17-out-invert bit rw

sim-parport.N.pin-01-out-reset bit rw

sim-parport.N.pin-02-out-reset bit rw

sim-parport.N.pin-03-out-reset bit rw

sim-parport.N.pin-04-out-reset bit rw

sim-parport.N.pin-05-out-reset bit rw

sim-parport.N.pin-06-out-reset bit rw

sim-parport.N.pin-07-out-reset bit rw

sim-parport.N.pin-08-out-reset bit rw

sim-parport.N.pin-09-out-reset bit rw

sim-parport.N.pin-14-out-reset bit rw

sim-parport.N.pin-16-out-reset bit rw

sim-parport.N.pin-17-out-reset bit rw

## AUTHOR
Chris S Morley

## LICENSE
GPL


title: sim_spindle(9)

summary: Simulated spindle with index pulse

text:
# sim_spindle(9)

## NAME
sim_spindle - Simulated spindle with index pulse

## SYNOPSIS
loadrt sim_spindle [count=N|names=name1[,name2...]]

## FUNCTIONS
sim-spindle.N (requires a floating-point thread)

## PINS
sim-spindle.N.velocity-cmd float in

Commanded speed

sim-spindle.N.position-fb float out

Feedback position, in revolutions

sim-spindle.N.index-enable bit io

Reset position-fb to 0 at the next full rotation

## PARAMETERS
sim-spindle.N.scale float rw (default: 1.0)

factor applied to velocity-cmd. The result of 'velocity-cmd * scale' be in revolutions per second. For example, if velocity-cmd is in revolutions/minute, scale should be set to 1/60 or 0.016666667.

## AUTHOR
Michael Haberler

## LICENSE
GPL


title: simple_tp(9)

text:
# simple_tp(9)

## NAME
simple_tp - This component is a single axis simple trajectory planner, same as used for jogging in LinuxCNC.

## SYNOPSIS
Used by PNCconf to allow testing of acceleration and velocity values for an axis.

## FUNCTIONS
simple-tp.N.update (requires a floating-point thread)

## PINS
simple-tp.N.target-pos float in

target position to plan for.

simple-tp.N.maxvel float in

Maximum velocity

simple-tp.N.maxaccel float in

Acceleration rate

simple-tp.N.enable bit in

If disabled, planner sets velocity to zero immediately.

simple-tp.N.current-pos float out

position commanded at this point in time.

simple-tp.N.current-vel float out

velocity commanded at this moment in time.

simple-tp.N.active bit out

if active is true, the planner is requesting movement.

## AUTHOR
Chris S Morley

## LICENSE
GPL


sphereprobe

title: sphereprobe(9)

summary: Probe a pretend hemisphere

text:
# sphereprobe(9)

## NAME
sphereprobe - Probe a pretend hemisphere

## SYNOPSIS
loadrt sphereprobe [count=N|names=name1[,name2...]]

## FUNCTIONS
sphereprobe.N (requires a floating-point thread)

update probe-out based on inputs

## PINS
sphereprobe.N.px s32 in

sphereprobe.N.py s32 in

sphereprobe.N.pz s32 in

rawcounts position from software encoder

sphereprobe.N.cx s32 in

sphereprobe.N.cy s32 in

sphereprobe.N.cz s32 in

Center of sphere in counts

sphereprobe.N.r s32 in

Radius of hemisphere in counts

sphereprobe.N.probe-out bit out

## AUTHOR
Jeff Epler

## LICENSE
GPL


spindle

title: spindle(9)

text:
# spindle(9)

## NAME
spindle - Control a spindle with different acceleration and deceleration and optional gear change scaling

## SYNOPSIS
loadrt spindle [count=N|names=name1[,name2...]]

## DESCRIPTION
This component will control a spindle with adjustable acceleration and deceleration.

NOTE: This component is unfortunately named and creates pins with names very much like those created by the motion component.

In nearly every case this is not the documentation page that you are looking for.

See http://linuxcnc.org/docs/html/man/man9/motion.9.html instead.

It is designed for use with non-servo spindle drives that have separate fwd/reverse inputs, such as DC drives and inverters. If a spindle encoder is available it is used to tailor the acceleration and deceleration to the spindle load. If not the spindle speed is simulated. The component allows for gearboxes with up to 16 gears. Each gear has individual control of speeds, acceleration, driver gain and direction.

## FUNCTIONS
spindle.N (requires a floating-point thread)

## PINS
spindle.N.select-gear u32 in

Select a gear. Must be in the range 0 -> number of available gears -1. If you use this, do not use the select.x input pins.

spindle.N.commanded-speed float in

Commanded spindle speed (in RPM)

spindle.N.actual-speed float in

Actual spindle speed from a spindle encoder (in RPS). If you do not have a spindle encoder set the simulate_encoder parameter to 1.

spindle.N.simulate-encoder bit in

If you do not have an encoder, set this to 1.

spindle.N.enable bit in

If FALSE, the spindle is stopped at the gear's maximum deceleration.

spindle.N.spindle-lpf float in

Smooth the spindle-rpm-abs output when at speed, 0 = disabled. Suitable values are probably between 1 and 20 depending on how stable your spindle is.

spindle.N.spindle-rpm float out

Current spindle speed in RPM.+ve = forward, -ve = reverse. Uses the encoder input if available. If not, uses a simulated encoder speed.

spindle.N.spindle-rpm-abs float out

Absolute spindle speed in RPM. Useful for spindle speed displays.

spindle.N.output float out

Scaled output

spindle.N.current-gear u32 out

Currently selected gear.

spindle.N.at-speed bit out

TRUE when the spindle is at speed

spindle.N.forward bit out

TRUE for forward rotation

spindle.N.reverse bit out

TRUE for reverse rotation. Both forward and reverse are false when the spindle is stopped.

spindle.N.brake bit out

TRUE when decelerating

spindle.N.zero-speed bit out

TRUE when the spindle is stationary

spindle.N.limited bit out

TRUE when the commanded spindle speed is >max or <min.

## SEE ALSO
motion(9)

## NOTES
The following pins are created depending the 'numgears=' parameter.

One of each pin is created for each gear. If no gears are specified then one gear will be created. For instance if you have gears=2 on your command line, you will have two scale pins:

spindle.N.scale.0

spindle.N.scale.1

spindle.N.scale.x float in

Scale the output. For multiple gears you would use a different scale for each gear. If you need to reverse the output for some gears, use a negative scale.

spindle.N.min.x float in

Set the minimum speed allowed (in RPM). The limit output will be TRUE while the commanded speed is between 0 RPM and the min speed.

spindle.N.max.x float in

Set the maximum speed allowed (in RPM). The limit output will be TRUE while the commanded speed is above this value.

spindle.N.accel.x float in

Set the maximum acceleration. If you do not have a spindle encoder this is in RPM/second. If you do have an encoder the output is the actual speed plus this value. This way the acceleration can be dependent on the spindle load.

spindle.N.decel.x float in

Set the minimum deceleration. If you do not have a spindle encoder this is in RPM/second. If you do have an encoder the output is the actual speed minus this value.

spindle.N.speed-tolerance.x float in

Tolerance for 'at-speed' signal (in RPM). Actual spindle speeds within this amount of the commanded speed will cause the at-speed signal to go TRUE.

spindle.N.zero-tolerance.x float in

Tolerance for 'zero-speed' signal (in RPM).

spindle.N.offset.x float in

The output command is offset by this amount (in RPM).

spindle.N.select.x bit in

Selects this gear. If no select inputs are active, gear 0 is selected. If multiple select inputs are active then the highest is selected.

## AUTHOR
Les Newell

## LICENSE
GPL


title: spindle_monitor(9)

text:
# spindle_monitor(9)

## NAME
spindle_monitor - spindle at-speed and underspeed detection

## SYNOPSIS
loadrt spindle_monitor [count=N|names=name1[,name2...]]

## FUNCTIONS
spindle-monitor.N (requires a floating-point thread)

## PINS
spindle-monitor.N.spindle-is-on bit in

spindle-monitor.N.spindle-command float in

spindle-monitor.N.spindle-feedback float in

spindle-monitor.N.spindle-at-speed bit out

spindle-monitor.N.spindle-underspeed bit out

## PARAMETERS
spindle-monitor.N.level u32 rw

state machine state

spindle-monitor.N.threshold float rw

## AUTHOR
Sebastian Kuzminsky

## LICENSE
gpl v2 or higher


sserial

title: sserial(9)

text:
# sserial(9)

## NAME
hostmot2 - Smart Serial LinuxCNC HAL driver for the Mesa Electronics HostMot2 Smart-Serial remote cards

## SYNOPSIS
The Mesa Smart-Serial interface is a 2.5Mbs proprietary interface between the Mesa Anything-IO cards and a range of subsidiary devices termed "smart-serial remotes". The remote cards perform a variety of functions, but typically they combine various classes of IO. The remote cards are self-configuring, in that they tell the main LinuxCNC Hostmot2 driver what their pin functions are and what they should be named.

Many sserial remotes offer different pinouts depending on the mode they are started up in. This is set using the sserial_port_N= option in the hm2_pci modparam. See the hostmot2 manpage for further details.

It is likely that this documentation will be permanently out of date.

Each Anything-IO board can attach up to 8 sserial remotes to each header (either the 50-pin headers on the 5I20/5I22/5I23/7I43 or the 25-pin connectors on the 5I25, 6I25 and 7I80). The remotes are grouped into "ports" of up to 8 "channels". Typically each header will be a single 8 channel port, but this is not necessarily always the case.

## PORTS
In addition to the per-channel/device pins detailed below there are three per-port pins and three parameters.

Pins:

(bit, in) .sserial.port-N.run: Enables the specific Smart Serial module. Setting this pin low will disable all boards on the port and puts the port in a pass-through mode where device parameter setting is possible. It is necessary to toggle the state of this pin if there is a requirement to alter a remote parameter on a live system. This pin defaults to TRUE and can be left unconnected. However, toggling the pin low-to-high will re-enable a faulted drive so the pin could usefully be connected to the iocontrol.0.user-enable-out pin.

(u32, ro) .run_state: Shows the state of the sserial communications state-machine. This pin will generally show a value of 0x03 in normal operation, 0x07 in setup mode and 0x00 when the "run" pin is false.

(u32, ro) .error-count: Indicates the state of the Smart Serial error handler, see the parameters section for more details.

Parameters:

(u32 r/w) .fault-inc: Any over-run or handshaking error in the SmartSerial communications will increment the .fault-count pin by the amount specified by this parameter. Default = 10.

(u32 r/w) .fault-dec: Every successful read/write cycle decrements the fault counter by this amount. Default = 1.

(u32 r/w) .fault-lim: When the fault counter reaches this threshold the Smart Serial interface on the corresponding port will be stopped and an error printed in dmesg. Together these three pins allow for control over the degree of fault- tolerance allowed in the interface. The default values mean that if more than one transaction in ten fails, more than 20 times, then a hard error will be raised. If the increment were to be set to zero then no error would ever be raised, and the system would carry on regardless. Conversely setting decrement to zero, threshold to 1 and limit to 1 means that absolutely no errors will be tolerated. (This structure is copied directly from vehicle ECU practice.)

Any other parameters than the ones above are created by the card istelf from data in the remote firmware. They may be set in the HAL file using "setp" in the usual way.

NOTE: Because a Smart-Serial remote can only communicate non-process data to the host card in setup mode, it is necessary to stop and re-start the smart-serial port associated with the card to alter the value of a parameter.

ALSO NOTE: in the case of parameters beginning with "nv" (which are stored in non-volatile memory) the effect will not be seen until after the next power cycle of the drive.

Unchanged values will not be re-written so it is safe to leave the "setp" commands in the HAL file or delete them as you see fit.

## DEVICES
The other pins and parameters created in HAL depend on the devices detected. The following list of Smart Serial devices is by no means exhaustive.

### 8I20
The 8I20 is a 2.2 kW three-phase drive for brushless DC motors and AC servo motors. 8I20 pins and parameters have names like "hm2_<BoardType>.<BoardNum>.8i20.<PortNum>.<ChanNum>.<Pin>", for example "hm2_5i23.0.8i20.1.3.current" would set the phase current for the drive connected to the fourth channel of the second sserial port of the first 5I23 board. Note that the sserial ports do not necessarily correlate in layout or number to the physical ports on the card.

Pins:

(float in) angle

The rotor angle of the motor in fractions of a full phase revolution. An angle of 0.5 indicates that the motor is half a turn / 180 degrees / π radians from the zero position. The zero position is taken to be the position that the motor adopts under no load with a poitive voltage applied to the A (or U) phase and both B and C (or V and W) connected to -V or 0 V. A 6 pole motor will have 3 zero positions per physical rotation. Note that the 8I20 drive automatically adds the phase lead/lag angle, and that this pin should see the raw rotor angle. There is a HAL module (bldc) which handles the complexity of differing motor and drive types.

(float, in) current

The phase current command to the drive. This is scaled from -1 to +1 for forwards and reverse maximum currents. The absolute value of the current is set by the max_current parameter.

(float, ro) bus-voltage

The drive bus voltage in V. This will tend to show 25.6 V when the drive is unpowered and the drive will not operate below about 50 V.

(float, ro) temp

The temperature of the driver in degrees C.

(u32, ro) comms

The communication status of the drive. See the manual for more details.

(bit, ro) status and fault.

The following fault/status bits are exported. For further details see the 8I20 manual. fault.U-current / fault.U-current-not fault.V-current / fault.V-current-not fault.W-current / fault.W-current-not fault.bus-high / fault.bus-high-not fault.bus-overv / fault.bus-overv-not fault.bus-underv / fault.bus-underv-not fault.framingr / fault.framingr-not fault.module / fault.module-not fault.no-enable / fault.no-enable-not fault.overcurrent / fault.overcurrent-not fault.overrun / fault.overrun-not fault.overtemp / fault.overtemp-not fault.watchdog / fault.watchdog-not status.brake-old / status.brake-old-not status.brake-on / status.brake-on-not status.bus-underv / status.bus-underv-not status.current-lim / status.current-lim-no status.ext-reset / status.ext-reset-not status.no-enable / status.no-enable-not status.pid-on / status.pid-on-not status.sw-reset / status.sw-reset-not status.wd-reset / status.wd-reset-not

Parameters:

The following parameters are exported. See the PDF documentation downloadable from Mesa for further details.

hm2_5i25.0.8i20.0.1.angle-maxlim

hm2_5i25.0.8i20.0.1.angle-minlim

hm2_5i25.0.8i20.0.1.angle-scalemax

hm2_5i25.0.8i20.0.1.current-maxlim

hm2_5i25.0.8i20.0.1.current-minlim

hm2_5i25.0.8i20.0.1.current-scalemax

hm2_5i25.0.8i20.0.1.nvbrakeoffv

hm2_5i25.0.8i20.0.1.nvbrakeonv

hm2_5i25.0.8i20.0.1.nvbusoverv

hm2_5i25.0.8i20.0.1.nvbusundervmax

hm2_5i25.0.8i20.0.1.nvbusundervmin

hm2_5i25.0.8i20.0.1.nvkdihi

hm2_5i25.0.8i20.0.1.nvkdil

hm2_5i25.0.8i20.0.1.nvkdilo

hm2_5i25.0.8i20.0.1.nvkdp

hm2_5i25.0.8i20.0.1.nvkqihi

hm2_5i25.0.8i20.0.1.nvkqil

hm2_5i25.0.8i20.0.1.nvkqilo

hm2_5i25.0.8i20.0.1.nvkqp

hm2_5i25.0.8i20.0.1.nvmaxcurrent

hm2_5i25.0.8i20.0.1.nvrembaudrate

hm2_5i25.0.8i20.0.1.swrevision

hm2_5i25.0.8i20.0.1.unitnumber

(float, rw) max_current

Sets the maximum drive current in Amps. The default value is the maximum current programmed into the drive EEPROM. The value must be positive, and an error will be raised if a current in excess of the drive maximum is requested.

(u32, ro) serial_number

The serial number of the connected drive. This is also shown on the label on the drive.

### 7I64
The 7I64 is a 24-input 24-output IO card. 7I64 pins and parameters have names like "hm2_<BoardType>.<BoardNum>.7i64.<PortNum>.<ChanNum>.<Pin>", for example hm2_5i23.0.7i64.1.3.output-01 .

Pins:

(bit, in) 7i64.0.0.output-NN: Writing a 1 or TRUE to this pin will enable output driver NN. Note that the outputs are drivers (switches) rather than voltage outputs. The LED adjacent to the connector on the board shows the status. The output can be inverted by setting a parameter.

(bit, out) 7i64.0.0.input-NN: The value of input NN. Note that the inputs are isolated and both pins of each input must be connected, typically to signal and the ground of the signal. (This need not be the ground of the board.)

(bit, out) 7i64.0.0.input-NN-not: An inverted copy of the corresponding input.

(float, out) 7i64.0.0.analog0 & 7i64.0.0.analog1: The two analogue inputs (0 to 3.3 V) on the board.

Parameters:

(bit, rw) 7i64.0.0.output-NN-invert: Setting this parameter to 1 / TRUE will invert the output value, such that writing 0 to .gpio.NN.out will enable the output and vice-versa.

### 7I76
The 7I76 is not really a smart-serial device. It serves as a breakout for a number of other Hostmot2 functions. There are connections for 5 step generators (for which see the main hostmot2 manpage). The stepgen pins are associated with the 5I25 (hm2_5i25.0.stepgen.00....) whereas the smart-serial pins are associated with the 7I76 (hm2_5i25.0.7i76.0.0.output-00).

Pins:

(float out) .7i76.0.0.analogN (modes 1 and 2 only) Analogue input values.

(float out) .7i76.0.0.fieldvoltage (mode 2 only) Field voltage monitoring pin.

(bit in) .7i76.0.0.spindir: This pin provides a means to drive the spindle VFD direction terminals on the 7I76 board.

(bit in) .7i76.0.0.spinena: This pin drives the spindle-enable terminals on the 7I76 board.

(float in) .7i76.0.0.spinout: This controls the analogue output of the 7I76. This is intended as a speed control signal for a VFD.

(bit out) .7i76.0.0.output-NN: (NN = 0 to 15). 16 digital outputs. The sense of the signal can be set via a parameter.

(bit out) .7i76.0.0.input-NN: (NN = 0 to 31) 32 digital inputs.

(bit in) .7i76.0.0.input-NN-not: (NN = 0 to 31) An inverted copy of the inputs provided for convenience. The two complementary pins may be connected to different signal nets.

Parameters:

(u32 ro) .7i76.0.0.nvbaudrate: Indicates the vbaud rate. This probably should not be altered.

(u32 ro) .7i76.0.0.nvunitnumber: Indicates the serial number of the device and should match a sticker on the card. This can be useful for working out which card is which.

(u32 ro) .7i76.0.0.nvwatchdogtimeout: The sserial remote watchdog timeout. This is separate from the Anything-IO card timeout. This is unlikely to need to be changed.

(bit rw) .7i76.0.0.output-NN-invert: Invert the sense of the corresponding output pin.

(bit rw) .7i76.0.0.spindir-invert: Invert the senseof the spindle direction pin.

(bit rw) .7i76.0.0.spinena-invert: Invert the sense of the spindle-enable pin.

(float rw) .7i76.0.0.spinout-maxlim: The maximum speed request allowable

(float rw) .7i76.0.0.spinout-minlim: The minimum speed request.

(float rw) .7i76.0.0.spinout-scalemax: The spindle speed scaling. This is the speed request which would correspond to full-scale output from the spindle control pin. For example with a 10 V drive voltage and a 10000 RPM scalemax a value of 10,000 RPM on the spinout pin would produce 10 V output. However, if spinout-maxlim were set to 5,000 RPM then no voltage above 5 V would be output.

(u32 ro) .7i76.0.0.swrevision: The onboard firmware revision number. Utilities (man setsserial for details) exist to update and change this firmware.

### 7I77
The 7I77 is an 6-axis servo control card. The analogue outputs are smart-serial devices, but the encoders are conventional hostmot2 encoders and further details of them may be found in the hostmot2 manpage.

Pins:

(bit out) .7i77.0.0.input-NN: (NN = 0 to 31) 32 digital inputs.

(bit in) .7i77.0.0.input-NN-not: (NN = 0 to 31) An inverted copy of the inputs provided for convenience. The two complementary pins may be connected to different signal nets.

(bit out) .7i77.0.0.output-NN: (NN = 0 to 15). 16 digital outputs. The sense of the signal can be set via a parameter.

(bit in) .7i77.0.0.spindir: This pin provides a means to drive the spindle VFD direction terminals on the 7I76 board.

(bit in) .7i77.0.0.spinena: This pin drives the spindle-enable terminals on the 7I76 board.

(float in) .7i77.0.0.spinout: This controls the analog output of the 7I77. This is intended as a speed control signal for a VFD.

(bit in) .7i77.0.1.analogena: This pin drives the analog enable terminals on the 7I77 board.

(float in) .7i77.0.1.analogoutN: (N = 0 to 5) This controls the analog output of the 7I77.

Parameters:

(bit rw) .7i77.0.0.output-NN-invert: Invert the sense of the corresponding output pin.

(bit rw) .7i77.0.0.spindir-invert: Invert the sense of the spindle direction pin.

(bit rw) .7i77.0.0.spinena-invert: Invert the sense of the spindle-enable pin.

(float rw) .7i77.0.0.spinout-maxlim: The maximum speed request allowable

(float rw) .7i77.0.0.spinout-minlim: The minimum speed request.

(float rw) .7i77.0.0.spinout-scalemax: The spindle speed scaling. This is the speed request which would correspond to full-scale output from the spindle control pin. For example with a 10 V drive voltage and a 10000 RPM scalemax a value of 10,000 RPM on the spinout pin would produce 10 V output. However, if spinout-maxlim were set to 5,000 RPM then no voltage above 5 V would be output.

(float rw) .7i77.0.0.analogoutN-maxlim: (N = 0 to 5) The maximum speed request allowable

(float rw) .7i77.0.0.analogoutN-minlim: (N = 0 to 5) The minimum speed request.

(float rw) .7i77.0.0.analogoutN-scalemax: (N = 0 to 5) The analog speed scaling. This is the speed request which would correspond to full-scale output from the spindle control pin. For example with a 10 V drive voltage and a 10000 RPM scalemax a value of 10,000 RPM on the spinout pin would produce 10 V output. However, if spinout-maxlim were set to 5,000 RPM then no voltage above 5 V would be output.

### 7I69
The 7I69 is a 48 channel digital IO card. It can be configured in four different modes:

MODE 0: Bidirectional mode (48 bits in 48 bits out)

MODE 1: Input only mode (48 bits in)

MODE 2: Output only mode (48 bits out)

MODE 3: 24/24mode (24 bits in = bits 0..23 and 24 bits out = bits 24..47)

MODE 4: Bidirectional mode (48 bits in 48 bits out) plus 4 MPG encoder channels oninputs 0 through 7

Pins:

(bit in) .7i69.0.0.output-NN: Digital output. Sense can be inverted with the corresponding Parameter.

(bit out) .7i69.0.0.input-NN: Digital input

(bit out) .7i69.0.0.input-NN-not: Digital input, inverted.

Parameters:

(u32 ro) .7i69.0.0.nvbaudrate: Indicates the vbaud rate. This probably should not be altered.

(u32 ro) .7i69.0.0.nvunitnumber: Indicates the serial number of the device and should match a sticker on the card. This can be useful for working out which card is which.

(u32 ro) .7i69.0.0.nvwatchdogtimeout: The sserial remote watchdog timeout. This is separate from the Anything-IO card timeout. This is unlikely to need to be changed.

(bit rw) .7i69.0.0.output-NN-invert: Invert the sense of the corresponding output pin.

(u32 ro) .7i69.0.0.swrevision: The onboard firmware revision number. Utilities exist to update and change this firmware.

### 7I70
The 7I70 is a remote isolated 48 input card. The 7I70 inputs sense positive inputs relative to a common field ground. Input impedance is 10 kΩ and input voltage can range from 5 VDC to 32 VDC. All inputs have LED status indicators. The input common field ground is galvanically isolated from the communications link.

The 7I70 has three software selectable modes. These different modes select different sets of 7I70 data to be transferred between the host and the 7I70 during real time process data exchanges. For high speed applications, choosing the correct mode can reduced the data transfer sizes, resulting in higher maximum update rates.

MODE 0: Input mode (48 bits input data only

MODE 1: Input plus analog mode (48 bits input data plus 6 channels of analog data)

MODE 2: Input plus field voltage

Pins:

(float out) .7i70.0.0.analogN (modes 1 and 2 only) Analogue input values.

(float out) .7i70.0.0.fieldvoltage (mode 2 only) Field voltage monitoring pin.

(bit out) .7i70.0.0.input-NN: (NN = 0 to 47) 48 digital inputs.

(bit in) .7i70.0.0.input-NN-not: (NN = 0 to 47) An inverted copy of the inputs provided for convenience. The two complementary pins may be connected to different signal nets.

Parameters:

(u32 ro) .7i70.0.0.nvbaudrate: Indicates the vbaud rate. This probably should not be altered.

(u32 ro) .7i70.0.0.nvunitnumber: Indicates the serial number of the device and should match a sticker on the card. This can be useful for working out which card is which.

(u32 ro) .7i70.0.0.nvwatchdogtimeout: The sserial remote watchdog timeout. This is separate from the Anything-IO card timeout. This is unlikely to need to be changed.

(u32 ro) .7i69.0.0.swrevision: The onboard firmware revision number. Utilities exist to update and change this firmware.

### 7I71
The 7I71 is a remote isolated 48 output card. The 48 outputs are 8VDC to 28VDC sourcing drivers (common + field power) with 300 mA maximum current capability. All outputs have LED status indicators.

The 7I71 has two software selectable modes. For high speed applications, choosing the correct mode can reduced the data transfer sizes, resulting in higher maximum update rates

MODE 0: Output only mode (48 bits output data only)

MODE 1: Outputs plus read back field voltage

Pins:

(float out) .7i71.0.0.fieldvoltage (mode 2 only) Field voltage monitoring pin.

(bit out) .7i71.0.0.output-NN: (NN = 0 to 47) 48 digital outputs. The sense may be inverted by the invert parameter.

Parameters:

(bit rw) .7i71.0.0.output-NN-invert: Invert the sense of the corresponding output pin.

(u32 ro) .7i71.0.0.nvbaudrate: Indicates the vbaud rate. This probably should not be altered.

(u32 ro) .7i71.0.0.nvunitnumber: Indicates the serial number of the device and should match a sticker on the card. This can be useful for determining which card is which.

(u32 ro) .7i71.0.0.nvwatchdogtimeout: The sserial remote watchdog timeout. This is separate from the Anything-IO card timeout. This is unlikely to need to be changed.

(u32 ro) .7i69.0.0.swrevision: The onboard firmware revision number. Utilities exist to update and change this firmware.

### 7I73
The 7I73 is a remote real time pendant or control panel interface.

The 7I73 supports up to four 50 kHz encoder inputs for MPGs, 8 digital inputs and 6 digital outputs and up to a 64 Key keypad. If a smaller keypad is used, more digital inputs and outputs become available. Up to eight 0.0 V to 3.3 V analog inputs are also provided. The 7I73 can drive a 4 line 20 character LCD for local DRO applications.

The 7I73 has 3 software selectable process data modes. These different modes select different sets of 7I73 data to be transferred between the host and the 7I73 during real time process data exchanges. For high speed applications, choosing the correct mode can reduced the data transfer sizes, resulting in higher maximum update rates

MODE 0: I/O + ENCODER

MODE 1: I/O + ENCODER + ANALOG IN

MODE 2: I/O + ENCODER + ANALOG IN FAST DISPLAY

Pins:

(float out) .7i73.0.0.analoginN: Analogue inputs. Up to 8 channels may be available dependent on software and hardware configuration modes (see the PDF manual downloadable from www.mesanet.com).

(u32 in) .7i73.0.1.display (modes 1 and 2). Data for LCD display. This pin may be conveniently driven by the HAL "lcd" component which allows the formatted display of the values any number of HAL pins and textual content.

(u32 in) .7i73.0.1.display32 (mode 2 only). 4 bytes of data for LCD display. This mode is not supported by the HAL "lcd" component.

(s32 out) .7i73.0.1.encN: The position of the MPG encoder counters.

(bit out) .7i73.0.1.input-NN: Up to 24 digital inputs (dependent on config)

(bit out) .7i73.0.1.input-NN-not: Inverted copy of the digital inputs

(bit in) .7i73.0.1.output-NN: Up to 22 digital outputs (dependent on config)

Parameters:

(u32 ro) .7i73.0.1.nvanalogfilter

(u32 ro) .7i73.0.1.nvbaudrate

(u32 ro) .7i73.0.1.nvcontrast

(u32 ro) .7i73.0.1.nvdispmode

(u32 ro) .7i73.0.1.nvencmode0

(u32 ro) .7i73.0.1.nvencmode1

(u32 ro) .7i73.0.1.nvencmode2

(u32 ro) .7i73.0.1.nvencmode3

(u32 ro) .7i73.0.1.nvkeytimer

(u32 ro) .7i73.0.1.nvunitnumber

(u32 ro) .7i73.0.1.nvwatchdogtimeout

(u32 ro) .7i73.0.1.output-00-invert

For further details of the use of the above see the Mesa manual.

(bit rw) .7i73.0.1.output-01-invert: Invert the corresponding output bit.

(s32 ro) .7i73.0.1.swrevision: The version of firmware installed.


stepgen

title: stepgen(9)

summary: software step pulse generation

text:
# stepgen(9)

## NAME
stepgen - software step pulse generation

## SYNOPSIS
loadrt stepgen step_type=type0[,type1...] [ctrl_type=type0[,type1...]] [user_step_type=#,#...]

## DESCRIPTION
stepgen is used to control stepper motors. The maximum step rate depends on the CPU and other factors, and is usually in the range of 5 kHz to 25 kHz. If higher rates are needed, a hardware step generator is a better choice.

stepgen has two control modes, which can be selected on a channel by channel basis using ctrl_type. Possible values are "p" for position control, and "v" for velocity control. The default is position control, which drives the motor to a commanded position, subject to acceleration and velocity limits. Velocity control drives the motor at a commanded speed, again subject to accel and velocity limits. Usually, position mode is used for machine axes. Velocity mode is reserved for unusual applications where continuous movement at some speed is desired, instead of movement to a specific position. (Note that velocity mode replaces the former component freqgen.)

stepgen can control a maximum of 16 motors. The number of motors/channels actually loaded depends on the number of type values given. The value of each type determines the outputs for that channel. Position or velocity mode can be individually selected for each channel. Both control modes support the same 16 possible step types.

By far the most common step type is '0', standard step and direction. Others include up/down, quadrature, and a wide variety of three, four, and five phase patterns that can be used to directly control some types of motor windings. (When used with appropriate buffers of course.)

Some of the stepping types are described below, but for more details (including timing diagrams) see the stepgen section of the HAL reference manual.

type 0: step/dir

Two pins, one for step and one for direction. make-pulses must run at least twice for each step (once to set the step pin true, once to clear it). This limits the maximum step rate to half (or less) of the rate that can be reached by types 2-14. The parameters steplen and stepspace can further lower the maximum step rate. Parameters dirsetup and dirhold also apply to this step type.

type 1: up/down

Two pins, one for 'step up' and one for 'step down'. Like type 0, make-pulses must run twice per step, which limits the maximum speed.

type 2: quadrature

Two pins, phase-A and phase-B. For forward motion, A leads B. Can advance by one step every time make-pulses runs.

type 3: three phase, full step

Three pins, phase-A, phase-B, and phase-C. Three steps per full cycle, then repeats. Only one phase is high at a time - for forward motion the pattern is A, then B, then C, then A again.

type 4: three phase, half step

Three pins, phases A through C. Six steps per full cycle. First A is high alone, then A and B together, then B alone, then B and C together, etc.

types 5 through 8: four phase, full step

Four pins, phases A through D. Four steps per full cycle. Types 5 and 6 are suitable for use with unipolar steppers, where power is applied to the center tap of each winding, and four open-collector transistors drive the ends. Types 7 and 8 are suitable for bipolar steppers, driven by two H-bridges.

types 9 and 10: four phase, half step

Four pins, phases A through D. Eight steps per full cycle. Type 9 is suitable for unipolar drive, and type 10 for bipolar drive.

types 11 and 12: five phase, full step

Five pins, phases A through E. Five steps per full cycle. See HAL reference manual for the patterns.

types 13 and 14: five phase, half step

Five pins, phases A through E. Ten steps per full cycle. See HAL reference manual for the patterns.

type 15: user-specified

This uses the waveform specified by the user_step_type module parameter, which may have up to 10 steps and 5 phases.

## FUNCTIONS
stepgen.make-pulses (no floating-point)

Generates the step pulses, using information computed by update-freq. Must be called as frequently as possible, to maximize the attainable step rate and minimize jitter. Operates on all channels at once.

stepgen.capture-position (uses floating point)

Captures position feedback value from the high speed code and makes it available on a pin for use elsewhere in the system. Operates on all channels at once.

stepgen.update-freq (uses floating point)

Accepts a velocity or position command and converts it into a form usable by make-pulses for step generation. Operates on all channels at once.

## PINS
stepgen.N.counts s32 out

The current position, in counts, for channel N. Updated by capture-position.

stepgen.N.position-fb float out

The current position, in length units (see parameter position-scale). Updated by capture-position. The resolution of position-fb is much finer than a single step. If you need to see individual steps, use counts.

stepgen.N.enable bit in

Enables output steps - when false, no steps are generated.

stepgen.N.velocity-cmd float in (velocity mode only)

Commanded velocity, in length units per second (see parameter position-scale).

stepgen.N.position-cmd float in (position mode only)

Commanded position, in length units (see parameter position-scale).

stepgen.N.step bit out (step type 0 only)

Step pulse output.

stepgen.N.dir bit out (step type 0 only)

Direction output: low for forward, high for reverse.

stepgen.N.up bit out (step type 1 only)

Count up output, pulses for forward steps.

stepgen.N.down bit out (step type 1 only)

Count down output, pulses for reverse steps.

stepgen.N.phase-A thru phase-E bit out (step types 2-14 only)

Output bits. phase-A and phase-B are present for step types 2-14, phase-C for types 3-14, phase-D for types 5-14, and phase-E for types 11-14. Behavior depends on selected stepping type.

## PARAMETERS
stepgen.N.frequency float ro

The current step rate, in steps per second, for channel N.

stepgen.N.maxaccel float rw

The acceleration/deceleration limit, in length units per second squared.

stepgen.N.maxvel float rw

The maximum allowable velocity, in length units per second. If the requested maximum velocity cannot be reached with the current combination of scaling and make-pulses thread period, it will be reset to the highest attainable value.

stepgen.N.position-scale float rw

The scaling for position feedback, position command, and velocity command, in steps per length unit.

stepgen.N.rawcounts s32 ro

The position in counts, as updated by make-pulses. (Note: this is updated more frequently than the counts pin.)

stepgen.N.steplen u32 rw

The length of the step pulses, in nanoseconds. Measured from rising edge to falling edge.

stepgen.N.stepspace u32 rw (step types 0 and 1 only)

The minimum space between step pulses, in nanoseconds. Measured from falling edge to rising edge. The actual time depends on the step rate and can be much longer. If stepspace is 0, then step can be asserted every period. This can be used in conjunction with hal_parport's auto-resetting pins to output one step pulse per period. In this mode, steplen must be set for one period or less.

stepgen.N.dirsetup u32 rw (step type 0 only)

The minimum setup time from direction to step, in nanoseconds periods. Measured from change of direction to rising edge of step.

stepgen.N.dirhold u32 rw (step type 0 only)

The minimum hold time of direction after step, in nanoseconds. Measured from falling edge of step to change of direction.

stepgen.N.dirdelay u32 rw (step types 1 and higher only)

The minimum time between a forward step and a reverse step, in nanoseconds.

## TIMING
There are five timing parameters which control the output waveform. No step type uses all five, and only those which will be used are exported to HAL. The values of these parameters are in nano-seconds, so no recalculation is needed when changing thread periods. In the timing diagrams that follow, they are identified by the following numbers:

(1) stepgen.n.steplen

(2) stepgen.n.stepspace

(3) stepgen.n.dirhold

(4) stepgen.n.dirsetup

(5) stepgen.n.dirdelay

For step type 0, timing parameters 1 thru 4 are used. The following timing diagram shows the output waveforms, and what each parameter adjusts.

_____ _____ _____

STEP ____/ \_______/ \_____________/ \______

| | | | | |

Time |-(1)-|--(2)--|-(1)-|--(3)--|-(4)-|-(1)-|

|__________________

DIR ________________________________/

For step type 1, timing parameters 1, 2, and 5 are used. The following timing diagram shows the output waveforms, and what each parameter adjusts.

_____ _____

UP __/ \_____/ \________________________________

| | | | |

Time |-(1)-|-(2)-|-(1)-|---(5)---|-(1)-|-(2)-|-(1)-|

|_____| |_____|

DOWN ______________________________/ \_____/ \____

For step types 2 and higher, the exact pattern of the outputs depends on the step type (see the HAL manual for a full listing). The outputs change from one state to another at a minimum interval of steplen. When a direction change occurs, the minimum time between the last step in one direction and the first in the other direction is the sum of steplen and dirdelay.

## SEE ALSO
The HAL User Manual.


steptest

title: steptest(9)

text:
# steptest(9)

## NAME
steptest - Used by Stepconf to allow testing of acceleration and velocity values for an axis.

## SYNOPSIS
loadrt steptest [count=N|names=name1[,name2...]]

## FUNCTIONS
steptest.N (requires a floating-point thread)

## PINS
steptest.N.jog-minus bit in

Drive TRUE to jog the axis in its minus direction

steptest.N.jog-plus bit in

Drive TRUE to jog the axis in its positive direction

steptest.N.run bit in

Drive TRUE to run the axis near its current position_fb with a trapezoidal velocity profile

steptest.N.maxvel float in

Maximum velocity

steptest.N.maxaccel float in

Permitted Acceleration

steptest.N.amplitude float in

Approximate amplitude of positions to command during 'run'

steptest.N.dir s32 in

Direction from central point to test: 0 = both, 1 = positive, 2 = negative

steptest.N.position-cmd float out

steptest.N.position-fb float in

steptest.N.running bit out

steptest.N.run-target float out

steptest.N.run-start float out

steptest.N.run-low float out

steptest.N.run-high float out

steptest.N.pause s32 in (default: 0)

pause time for each end of run in seconds

## PARAMETERS
steptest.N.epsilon float rw (default: .001)

steptest.N.elapsed float r

Current value of the internal timer

## AUTHOR
Jeff Epler

## LICENSE
GPL


streamer

title: streamer(9)

summary: stream file data into HAL in real time

text:
# streamer(9)

## NAME
streamer - stream file data into HAL in real time

## SYNOPSIS
loadrt streamer depth=depth1[,depth2...] cfg=string1[,string2...]

## DESCRIPTION
streamer and halstreamer(1) are used together to stream data from a file into the HAL in real time. streamer is a realtime HAL component that exports HAL pins and creates a FIFO in shared memory. hal_streamer is a non-realtime program that copies data from stdin into the FIFO, so that streamer can write it to the HAL pins.

## OPTIONS
depth=depth1[,depth2...]

Sets the depth of the FIFO that the realtime streamer creates to receive data from the non-realtime hal-streamer. Multiple values of depth (separated by commas) can be specified if you need more than one FIFO (for example if you want to stream data to two different realtime threads).

cfg=string1[,string2...]

Defines the set of HAL pins that streamer exports and later writes data to. One string must be supplied for each FIFO, separated by commas. streamer exports one pin for each character in string. Legal characters are:

•F, f (float pin)

•B, b (bit pin)

•S, s (s32 pin)

•U, u (u32 pin)

## FUNCTIONS
streamer.N

One function is created per FIFO, numbered from zero.

## PINS
streamer.N.pin.M output

Data from column M of the data in FIFO N appears on this pin. The pin type depends on the config string.

streamer.N.curr-depth s32 output

Current number of samples in the FIFO. When this reaches zero, new data will no longer be written to the pins.

streamer.N.empty bit output

TRUE when the FIFO N is empty, FALSE when valid data is available.

streamer.N.enable bit input

When TRUE, data from FIFO N is written to the HAL pins. When false, no data is transferred. Defaults to TRUE.

streamer.N.underruns s32 read/write

The number of times that sampler has tried to write data to the HAL pins but found no fresh data in the FIFO. It increments whenever empty is true, and can be reset by the setp command.

streamer.N.*clock bit input

Clock for data as specified by the clock-mode pin

streamer.N.*clock-mode s32 input

Defines behavior of clock pin:

•0 (default) free run at every iteration

•1 clock on falling edge of clock pin

•2 clock on rising edge of clock pin

•3 clock on any edge of clock pin

## SEE ALSO
halstreamer(1), sampler(9), halsampler(1)

## BUGS
Should an enable HAL pin be added, to allow streaming to be turned on and off?

## AUTHOR
Original version by John Kasunich, as part of the LinuxCNC project. Improvements by several other members of the LinuxCNC development team.

## REPORTING BUGS
Report bugs to jmkasunich AT users DOT sourceforge DOT net

## COPYRIGHT
Copyright © 2006 John Kasunich. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


title: sum2(9)

text:
# sum2(9)

## NAME
sum2 - Sum of two inputs (each with a gain) and an offset

## SYNOPSIS
loadrt sum2 [count=N|names=name1[,name2...]]

## FUNCTIONS
sum2.N (requires a floating-point thread)

## PINS
sum2.N.in0 float in

sum2.N.in1 float in

sum2.N.out float out

out = in0 * gain0 + in1 * gain1 + offset

## PARAMETERS
sum2.N.gain0 float rw (default: 1.0)

sum2.N.gain1 float rw (default: 1.0)

sum2.N.offset float rw

## SEE ALSO
scaled_s32_sums(9), weighted_sum(9)

## AUTHOR
Jeff Epler

## LICENSE
GPL


supply

title: supply(9)

text:
# supply(9)

## NAME
supply - set output pins with values from parameters (obsolete)

## SYNOPSIS
loadrt supply num_chan=num

## DESCRIPTION
supply was used to allow the inputs of other HAL components to be manipulated for testing purposes. When it was written, the only way to set the value of an input pin was to connect it to a signal and connect that signal to an output pin of some other component, and then let that component write the pin value. supply was written to be that "other component". It reads values from parameters (set with the HAL command setp) and writes them to output pins.

Since supply was written, the setp command has been modified to allow it to set unconnected pins as well as parameters. In addition, the sets command was added, which can directly set HAL signals, as long as there are no output pins connected to them. Therefore, supply is obsolete.

supply supports a maximum of eight channels. The number of channels actually loaded is set by the num_chan argument when the module is loaded. If numchan is not specified, the default value is one.

## FUNCTIONS
supply.N.update (uses floating-point)

Updates output pins for channel N.

## PINS
supply.N.q bit out

Output bit, copied from parameter supply.N.d.

supply.N._q bit out

Output bit, inverted copy of parameter supply.N.d.

supply.N.variable float out

Analog output, copied from parameter supply.N.value.

supply.N._variable float out

Analog output, equal to -1.0 times parameter supply.N.value.

supply.N.d bit rw

Data source for q and _q output pins.

supply.N.value bit rw

Data source for variable and _variable output pins.


thc

title: thc(9)

summary: Torch Height Control

text:
# thc(9)

## NAME
thc - Torch Height Control

## SYNOPSIS
loadrt thc

## DESCRIPTION
Torch Height Control Mesa THC > Encoder > LinuxCNC THC component

The Mesa THC sends a frequency based on the voltage detected to the encoder. The velocity from the encoder is converted to volts with the velocity scale parameter inside the THC component.

The THCAD card sends a frequency at 0 volts so the scale offset parameter is used to zero the calculated voltage.

Component Functions If enabled and torch is on and X + Y velocity is within tolerance of set speed allow the THC to offset the Z axis as needed to maintain voltage.

If enabled and torch is off and the Z axis is moving up remove any correction at a rate not to exceed the rate of movement of the Z axis.

If enabled and torch is off and there is no correction pass the Z position and feed back untouched.

If not enabled pass the Z position and feed back untouched.

Physical Connections

Plasma Torch Arc Voltage Signal => 6 x 487k 1% resistors => THC Arc Voltage In

THC Frequency Signal => Encoder #0, pin A (Input)

Plasma Torch Arc OK Signal => input pin

output pin => Plasma Torch Start Arc Contacts

HAL Plasma Connections

encoder.nn.velocity => thc.encoder-vel (tip voltage)

spindle.0.on => output pin (start the arc)

thc.arc-ok <= motion.digital-in-00 <= input pin (arc ok signal)

HAL Motion Connections

thc.requested-vel <= motion.requested-vel

thc.current-vel <= motion.current-vel

## FUNCTIONS
thc (requires a floating-point thread)

## PINS
thc.encoder-vel float in

Connect to hm2_5i20.0.encoder.00.velocity

thc.current-vel float in

Connect to motion.current-vel

thc.requested-vel float in

Connect to motion.requested-vel

thc.volts-requested float in

Tip Volts current_vel >= min_velocity requested

thc.vel-tol float in

Velocity Tolerance (Corner Lock)

thc.torch-on bit in

Connect to spindle.N.on

thc.arc-ok bit in

Arc OK from Plasma Torch

thc.enable bit in

Enable the THC, if not enabled Z position is passed through

thc.z-pos-in float in

Z Motor Position Command in from axis.n.motor-pos-cmd

thc.z-pos-out float out

Z Motor Position Command Out

thc.z-fb-out float out

Z Position Feedback to Axis

thc.volts float out

The Calculated Volts

thc.vel-status bit out

When the THC thinks we are at requested speed

thc.offset-value float out

The Current Offset

## PARAMETERS
thc.vel-scale float rw

The scale to convert the Velocity signal to Volts

thc.scale-offset float rw

The offset of the velocity input at 0 volts

thc.velocity-tol float rw

The deviation percent from planned velocity

thc.voltage-tol float rw

The deviation of Tip Voltage before correction takes place

thc.correction-vel float rw

The amount of change in user units per period to move Z to correct

## AUTHOR
John Thornton

## LICENSE
GPLv2 or greater