ohmic

title: ohmic(9)

text:
# ohmic(9)

## NAME
ohmic - LinuxCNC HAL component that uses a Mesa THCAD for ohmic sensing

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

## DESCRIPTION
Mesa THCAD Card component to scale input and outputs from the Mesa THCAD2, THCAD5, THCAD10, and THCAD300 cards.

Allows user configurable voltage thresholds for ohmic sensing.

Output pins are provided for:

ohmic-volts -the voltage sensed on ohmic sensing.

thcad-volts -the actual voltage measured by the THCAD.

ohmic-on -true if ohmic-volts >= ohmic-threshold, false if ohmic-volts <= ohmic-low.

A THCAD-5 would often be used for ohmic sensing in conjunction with a 24 Volt isolated power supply and a 390 kΩ series resistor resulting in a voltage divider of 4.9.

This would result in a full scale reading of 24.5 Volts which is above the power supply output voltage.

The circuit will remain protected by the THCAD's ability to tolerate a 500 Volt over-voltage indefinitely.

It is optional that power to the ohmic sensing circuit be disconnected unless probing is in progress.

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

## PINS
ohmic.N.is-probing bit in

True if probing

ohmic.N.ohmic-low float in (default: 21)

The threshold volts below which ohmic sensing is set to be false

ohmic.N.ohmic-threshold float in (default: 22)

The threshold volts above which ohmic sensing is set to be true

ohmic.N.thcad-0-volt-freq float in

0 volt calibration data for THCAD card in Hz

ohmic.N.thcad-divide float in (default: 32)

THCAD divider set by links on THCAD board (1, 32, 64, or 128)

ohmic.N.thcad-fullscale float in (default: 5)

THCAD full scale in Volt (5, 10, or 300 Volt)

ohmic.N.thcad-max-volt-freq float in

Full scale calibration data for THCAD Card in Hz

ohmic.N.velocity-in float in

The velocity returned from the THCAD and read by the Mesa encoder input

ohmic.N.volt-divider float in (default: 4.9)

The divide ratio

ohmic.N.ohmic-on bit out

True if ohmic circuit is closed (material is sensed)

ohmic.N.ohmic-volts float out

Calculated ohmic voltage

## EXAMPLES
The below HAL example assumes a THCAD5 card using a 1/32 frequency setting and a voltage divider internal to the plasma cutter with range extended to 24.5 volts by a series 390K external resistor as per the manual. Additional information and wiring diagram is contained in the Plasma Primer in the LinuxCNC documentation.

Example Calibration Data: 0V = 122.9 kHz, 10V = 925.7 kHz should be entered as 122900 and 925700.

loadrt ohmic names=ohmicsense

addf ohmicsense servo-thread

setp ohmicsense.thcad-0-volt-freq 122900

setp ohmicsense.thcad-max-volt-freq 925700

setp ohmicsense.thcad-divide 32

setp ohmicsense.thcad-fullscale 5

setp ohmicsense.volt-divider 4.9

setp ohmicsense.threshold 22

setp ohmicsense.ohmic-low 21

net ohmic-vel ohmicsense.velocity-in <= hm2_7i76e.0.encoder.00.velocity

net ohmic-enable ohmicsense.is_probing <= plasmac.ohmic-enable

net ohmic-true ohmicsense.ohmic-on => plasmac.ohmic-probe

## AUTHOR
Rod Webster

## LICENSE
GPL


oneshot

package: linuxcnc

title: oneshot(9)

summary: one-shot pulse generator

text:
# oneshot(9)

## NAME
oneshot - one-shot pulse generator

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

## DESCRIPTION
creates a variable-length output pulse when the input changes state. This function needs to run in a thread which supports floating point (typically the servo thread). This means that the pulse length has to be a multiple of that thread period, typically 1mS. For a similar function that can run in the base thread, and which offers higher resolution, see "edge".

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

Produce output pulses from input edges

## PINS
oneshot.N.in bit in

Trigger input

oneshot.N.reset bit in

Reset

oneshot.N.out bit out

Active high pulse

oneshot.N.out-not bit out

Active low pulse

oneshot.N.width float in (default: 0)

Pulse width in seconds

oneshot.N.time-left float out

Time left in current output pulse

## PARAMETERS
oneshot.N.retriggerable bit rw (default: TRUE)

Allow additional edges to extend pulse

oneshot.N.rising bit rw (default: TRUE)

Trigger on rising edge

oneshot.N.falling bit rw (default: FALSE)

Trigger on falling edge

## AUTHOR
John Kasunich

## LICENSE
GPL


title: opto_ac5(9)

text:
# opto_ac5(9)

## NAME
opto_ac5 - Realtime driver for opto22 PCI-AC5 cards

## SYNOPSIS
loadrt opto_ac5 [portconfig0=0xN] [portconfig1=0xN]

## DESCRIPTION
These pins and parameters are created by the realtime opto_ac5 module. The portconfig0 and portconfig1 variables are used to configure the two ports of each card. The first 24 bits of a 32 bit number represent the 24 i/o points of each port. The lowest (rightmost) bit would be HAL pin 0 which is header connector pin 47. Then next bit to the left would be HAL pin 1, header connector pin 45 and so on, until bit 24 would be HAL pin 23, header connector pin 1. "1" bits represent output points. So channel 0..11 as inputs and 12..23 as outputs would be represented by (in binary) 111111111111000000000000 which is 0xfff000 in hexadecimal. That is the number you would use, e.g., loadrt opto_ac5 portconfig0=0xfff000

If no portconfig variable is specified the default configuration is 12 inputs then 12 outputs.

Up to 4 boards are supported. Boards are numbered starting at 0.

Portnumber can be 0 or 1. Port 0 is closest to the card bracket.

## PINS
opto_ac5.[BOARDNUMBER].port[PORTNUMBER].in-[PINNUMBER] OUT bit

opto_ac5.[BOARDNUMBER].port[PORTNUMBER].in-[PINNUMBER]-not OUT bit

Connect a HAL bit signal to this pin to read an i/o point from the card. The PINNUMBER represents the position in the relay rack. E.g., PINNUMBER 0 is position 0 in a opto22 relay rack and would be pin 47 on the 50 pin header connector. The -not pin is inverted so that LOW gives TRUE and HIGH gives FALSE.

opto_ac5.[BOARDNUMBER].port[PORTNUMBER].out-[PINNUMBER] IN bit

Connect a HAL bit signal to this pin to write to an i/o point of the card. The PINNUMBER represents the position in the relay rack. E.g., PINNUMBER 23 is position 23 in a opto22 relay rack and would be pin 1 on the 50 pin header connector.

opto_ac5.[BOARDNUMBER].led[NUMBER] OUT bit

Turns one of the on board LEDS on/off. LEDS are numbered 0 to 3.

## PARAMETERS
opto_ac5.[BOARDNUMBER].port[PORTNUMBER].out-[PINNUMBER]-invert W bit

When TRUE, invert the meaning of the corresponding -out pin so that TRUE gives LOW and FALSE gives HIGH.

## FUNCTIONS
opto_ac5.0.digital-read

Add this to a thread to read all the input points.

opto_ac5.0.digital-write

Add this to a thread to write all the output points and LEDS.

## BUGS
All boards are loaded with the same port configurations as the first board.

## SEE ALSO
http://wiki.linuxcnc.org/cgi-bin/wiki.pl?OptoPciAc5


title: or2(9)

summary: Two-input OR gate

text:
# or2(9)

## NAME
or2 - Two-input OR gate

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

## FUNCTIONS
or2.N

## PINS
or2.N.in0 bit in

or2.N.in1 bit in

or2.N.out bit out

out is computed from the value of in0 and in1 according to the following rule:

in0=FALSE in1=FALSE

out=FALSE

Otherwise,

out=TRUE

## SEE ALSO
logic(9)

## AUTHOR
Jeff Epler

## LICENSE
GPL


orient

title: orient(9)

text:
# orient(9)

## NAME
orient - Provide a PID command input for orientation mode based on current spindle position, target angle and orient mode

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

## DESCRIPTION
This component is designed to support a spindle orientation PID loop by providing a command value, and fit with the motion spindle-orient support pins to support the M19 code.

The spindle is assumed to have stopped in an arbitrary position. The spindle encoder position is linked to the position pin. The current value of the position pin is sampled on a positive edge on the enable pin, and command is computed and set as follows: floor(number of full spindle revolutions in the position sampled on positive edge) plus angle/360 (the fractional revolution) +1/-1/0 depending on mode.

The mode pin is interpreted as follows:

0: the spindle rotates in the direction with the lesser angle, which may be clockwise or counterclockwise.

1: the spindle rotates always rotates clockwise to the new angle.

2: the spindle rotates always rotates counterclockwise to the new angle.

## HAL USAGE
On spindle.N.orient disconnect the spindle control and connect to the orient-pid loop:

loadrt orient names=orient

loadrt pid names=orient-pid

net orient-angle spindle.N.orient-angle orient.angle

net orient-mode spindle.N.orient-mode orient.mode

net orient-enable spindle.N.orient orient.enable orient-pid.enable

net spindle-in-pos orient.is-oriented spindle.N.is-oriented

net spindle-pos encoder.position orient.position orient-pid.feedback

net orient-command orient.command orient-pid.command

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

Update command based on enable, position, mode and angle.

## PINS
orient.N.enable bit in

enable angular output for orientation mode

orient.N.mode s32 in

0: rotate - shortest move; 1: always rotate clockwise; 2: always rotate counterclockwise

orient.N.position float in

spindle position input, unit 1 rev

orient.N.angle float in

orient target position in degrees, 0 <= angle < 360

orient.N.command float out

target spindle position, input to PID command

orient.N.poserr float out

in degrees - aid for PID tuning

orient.N.is-oriented bit out

This pin goes high when poserr < tolerance. Use to drive spindle.N.is-oriented

orient.N.tolerance float in (default: 0.5)

The tolerance in degrees for considering the align completed

## AUTHOR
Michael Haberler

## LICENSE
GPL


pentakins

title: pentakins(9)

text:
# pentakins(9)

See the file man9/kins.9.


pid

title: pid(9)

text:
# pid(9)

## NAME
pid - proportional/integral/derivative controller with automatic tuning support

## SYNOPSIS
loadrt pid [num_chan=num | names=name1[,name2...]] [debug=dbg]

## DESCRIPTION
pid is a classic Proportional/Integral/Derivative controller, used to control position or speed feedback loops for servo motors and other closed-loop applications.

pid supports a maximum of sixteen controllers. The number that are 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 three. If debug is set to 1 (the default is 0), some additional HAL parameters will be exported, which might be useful for tuning, but are otherwise unnecessary.

In the following description, it is assumed that we are discussing position loops. However this component can be used to implement other loops such as speed loops, torch height control, and others.

Each loop has a number of pins and parameters, whose names begin with 'pid.N.', where 'N' is the channel number. Channel numbers start at zero.

The three most important pins are 'command', 'feedback', and 'output'. For a position loop, 'command' and 'feedback' are in position units. For a linear axis, this could be inches, mm, metres, or whatever is relevant. Likewise, for a angular axis, it could be degrees, radians, etc. The units of the 'output' pin represent the change needed to make the feedback match the command. As such, for a position loop 'output' is a velocity, in inches/sec, mm/sec, degrees/sec, etc.

Each loop has several other pins as well. 'error' is equal to 'command' minus 'feedback'. 'enable' is a bit that enables the loop. If 'enable' is false, all integrators are reset, and the output is forced to zero. If 'enable' is true, the loop operates normally.

The PID gains, limits, and other 'tunable' features of the loop are implemented as parameters. These are as follows:

Pgain Proportional gain

Igain Integral gain

Dgain Derivative gain

bias Constant offset on output

FF0 Zeroth order Feedforward gain

FF1 First order Feedforward gain

FF2 Second order Feedforward gain

FF3 Third order Feedforward gain

deadband Amount of error that will be ignored

maxerror Limit on error

maxerrorI Limit on error integrator

maxerrorD Limit on error differentiator

maxcmdD Limit on command differentiator

maxcmdDD Limit on command 2nd derivative

maxcmdDDD Limit on command 3rd derivative

maxoutput Limit on output value

All of the limits (max____) are implemented such that if the parameter value is zero, there is no limit.

A number of internal values which may be useful for testing and tuning are also available as parameters. To avoid cluttering the parameter list, these are only exported if "debug=1" is specified on the insmod command line.

errorI Integral of error

errorD Derivative of error

commandD Derivative of the command

commandDD 2nd derivative of the command

commandDDD 3rd derivative of the command

The PID loop calculations are as follows (see the code in pid.c for all the nitty gritty details):

```
error = command - feedback
if ( abs(error) < deadband ) then error = 0
limit error to +/- maxerror
errorI += error * period
limit errorI to +/- maxerrorI
errorD = (error - previouserror) / period
limit errorD to +/- maxerrorD
commandD = (command - previouscommand) / period
limit commandD to +/- maxcmdD
commandDD = (commandD - previouscommandD) / period
limit commandDD to +/- maxcmdDD
commandDDD = (commandDD - previouscommandDD) / period
limit commandDDD to +/- maxcmdDDD
output = bias + error * Pgain + errorI * Igain +

         errorD * Dgain + command * FF0 + commandD * FF1 +

         commandDD * FF2 + commandDDD * FF3
limit output to +/- maxoutput
```

This component has a built in auto tune mode. It works by setting up a limit cycle to characterize the process. This is called the Relay method and described in the 1984 Automation paper Automatic Tuning of Simple Regulators with Specifications on Phase and Amplitude Margins by Karl Johan Åström and Tore Hägglund (doi:10.1016/0005-1098(84)90014-1), https://lup.lub.lu.se/search/ws/files/6340936/8509157.pdf. Using this method, Pgain/Igain/Dgain or Pgain/Igain/FF1 can be determined using the Ziegler-Nichols algorithm. When using FF1 tuning, scaling must be set so that output is in user units per second.

During auto tuning, the command input should not change. The limit cycle is setup around the commanded position. No initial tuning values are required to start auto tuning. Only tune-cycles, tune-effort and tune-mode need be set before starting auto tuning. Note that setting tune-mode to true disable the control loop. When auto tuning completes, the tuning parameters will be set, the output set to bias and the controller still be disabled. If running from LinuxCNC, the FERROR setting for the axis being tuned may need to be loosened up, as it must be larger than the limit cycle amplitude in order to avoid a following error.

To perform auto tuning, take the following steps. Move the axis to be tuned somewhere near the center of it's travel. Set tune-cycles (the default value should be fine in most cases) and tune-mode. Set tune-effort to a small value. Set enable to true. Set tune-mode to true. Set tune-start to true. If no oscillation occurs, or the oscillation is too small, slowly increase tune-effort. Set tune-start to true. If no oscillation occurs, or the oscillation is too small, slowly increase tune-effort Auto tuning can be aborted at any time by setting enable or tune-mode to false.

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

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

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

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

## FUNCTIONS
pid.N.do-pid-calcs (uses floating-point) Does the PID calculations for control loop N.

## PINS
pid.N.command float in

The desired (commanded) value for the control loop.

pid.N.Pgain float in

Proportional gain. Results in a contribution to the output that is the error multiplied by Pgain.

pid.N.Igain float in

Integral gain. Results in a contribution to the output that is the integral of the error multiplied by Igain. For example an error of 0.02 that lasted 10 seconds would result in an integrated error (errorI) of 0.2, and if Igain is 20, the integral term would add 4.0 to the output.

pid.N.Dgain float in

Derivative gain. Results in a contribution to the output that is the rate of change (derivative) of the error multiplied by Dgain. For example an error that changed from 0.02 to 0.03 over 0.2 seconds would result in an error derivative (errorD) of of 0.05, and if Dgain is 5, the derivative term would add 0.25 to the output.

pid.N.feedback float in

The actual (feedback) value, from some sensor such as an encoder.

pid.N.output float out

The output of the PID loop, which goes to some actuator such as a motor.

pid.N.command-deriv float in

The derivative of the desired (commanded) value for the control loop. If no signal is connected then the derivative will be estimated numerically.

pid.N.feedback-deriv float in

The derivative of the actual (feedback) value for the control loop. If no signal is connected then the derivative will be estimated numerically. When the feedback is from a quantized position source (e.g., encoder feedback position), behavior of the D term can be improved by using a better velocity estimate here, such as the velocity output of encoder(9) or hostmot2(9).

pid.N.error-previous-target bit in

Use previous invocation's target vs. current position for error calculation, like the motion controller expects. This may make torque-mode position loops and loops requiring a large I gain easier to tune, by eliminating velocity-dependent following error.

pid.N.error float out

The difference between command and feedback.

pid.N.enable bit in

When true, enables the PID calculations. When false, output is zero, and all internal integrators, etc, are reset.

pid.N.index-enable bit in

On the falling edge of index-enable, pid does not update the internal command derivative estimate. On systems which use the encoder index pulse, this pin should be connected to the index-enable signal. When this is not done, and FF1 is nonzero, a step change in the input command causes a single-cycle spike in the PID output. On systems which use exactly one of the -deriv inputs, this affects the D term as well.

pid.N.bias float in

bias is a constant amount that is added to the output. In most cases it should be left at zero. However, it can sometimes be useful to compensate for offsets in servo amplifiers, or to balance the weight of an object that moves vertically. bias is turned off when the PID loop is disabled, just like all other components of the output. If a non-zero output is needed even when the PID loop is disabled, it should be added with an external HAL sum2 block.

pid.N.FF0 float in

Zero order feed-forward term. Produces a contribution to the output that is FF0 multiplied by the commanded value. For position loops, it should usually be left at zero. For velocity loops, FF0 can compensate for friction or motor counter-EMF and may permit better tuning if used properly.

pid.N.FF1 float in

First order feed-forward term. Produces a contribution to the output that is FF1 multiplied by the derivative of the commanded value. For position loops, the contribution is proportional to speed, and can be used to compensate for friction or motor CEMF. For velocity loops, it is proportional to acceleration and can compensate for inertia. In both cases, it can result in better tuning if used properly.

pid.N.FF2 float in

Second order feed-forward term. Produces a contribution to the output that is FF2 multiplied by the second derivative of the commanded value. For position loops, the contribution is proportional to acceleration, and can be used to compensate for inertia. For velocity loops, the contribution is proportional to jerk, and should usually be left at zero.

pid.N.FF3 float in

Third order feed-forward term. Produces a contribution to the output that is FF3 multiplied by the third derivative of the commanded value. For position loops, the contribution is proportional to jerk, and can be used to compensate for residual errors during acceleration. For velocity loops, the contribution is proportional to snap(jounce), and should usually be left at zero.

pid.N.deadband float in

Defines a range of "acceptable" error. If the absolute value of error is less than deadband, it will be treated as if the error is zero. When using feedback devices such as encoders that are inherently quantized, the deadband should be set slightly more than one-half count, to prevent the control loop from hunting back and forth if the command is between two adjacent encoder values. When the absolute value of the error is greater than the deadband, the deadband value is subtracted from the error before performing the loop calculations, to prevent a step in the transfer function at the edge of the deadband (see BUGS).

pid.N.maxoutput float in

Output limit. The absolute value of the output will not be permitted to exceed maxoutput, unless maxoutput is zero. When the output is limited, the error integrator will hold instead of integrating, to prevent windup and overshoot.

pid.N.maxerror float in

Limit on the internal error variable used for P, I, and D. Can be used to prevent high Pgain values from generating large outputs under conditions when the error is large (for example, when the command makes a step change). Not normally needed, but can be useful when tuning non-linear systems.

pid.N.maxerrorD float in

Limit on the error derivative. The rate of change of error used by the Dgain term will be limited to this value, unless the value is zero. Can be used to limit the effect of Dgain and prevent large output spikes due to steps on the command and/or feedback. Not normally needed.

pid.N.maxerrorI float in

Limit on error integrator. The error integrator used by the Igain term will be limited to this value, unless it is zero. Can be used to prevent integrator windup and the resulting overshoot during/after sustained errors. Not normally needed.

pid.N.maxcmdD float in

Limit on command derivative. The command derivative used by FF1 will be limited to this value, unless the value is zero. Can be used to prevent FF1 from producing large output spikes if there is a step change on the command. Not normally needed.

pid.N.maxcmdDD float in

Limit on command second derivative. The command second derivative used by FF2 will be limited to this value, unless the value is zero. Can be used to prevent FF2 from producing large output spikes if there is a step change on the command. Not normally needed.

pid.N.maxcmdDDD float in

Limit on command third derivative. The command third derivative used by FF3 will be limited to this value, unless the value is zero. Can be used to prevent FF3 from producing large output spikes if there is a step change on the command. Not normally needed.

pid.N.saturated bit out

When true, the current PID output is saturated. That is,

output = ± maxoutput.

pid.N.saturated-s float out

pid.N.saturated-count s32 out

When true, the output of PID was continually saturated for this many seconds (saturated-s) or periods (saturated-count).

### Additional auto tuning pins
pid.N.tune-mode bit in

When true, enables auto tune mode. When false, normal PID calculations are performed.

pid.N.tune-start bit io

When set to true, starts auto tuning. Cleared when the auto tuning completes.

pid.N.tune-type u32 rw

When set to 0, Pgain/Igain/Dgain are calculated. When set to 1, Pgain/Igain/FF1 are calculated.

pid.N.tune-cycles u32 rw

Determines the number of cycles to run to characterize the process. tune-cycles actually sets the number of half cycles. More cycles results in a more accurate characterization as the average of all cycles is used.

pid.N.tune-effort float rw

Determines the effort used in setting up the limit cycle in the process. tune-effort should be set to a positive value less than maxoutput. Start with something small and work up to a value that results in a good portion of the maximum motor current being used. The smaller the value, the smaller the amplitude of the limit cycle.

pid.N.ultimate-gain float ro (only if debug=1)

Determined from process characterization. ultimate-gain is the ratio of tune-effort to the limit cycle amplitude multiplied by 4.0 divided by Pi.

pid.N.ultimate-period float ro (only if debug=1)

Determined from process characterization. ultimate-period is the period of the limit cycle.

## PARAMETERS
pid.N.errorI float ro (only if debug=1)

Integral of error. This is the value that is multiplied by Igain to produce the Integral term of the output.

pid.N.errorD float ro (only if debug=1)

Derivative of error. This is the value that is multiplied by Dgain to produce the Derivative term of the output.

pid.N.commandD float ro (only if debug=1)

Derivative of command. This is the value that is multiplied by FF1 to produce the first order feed-forward term of the output.

pid.N.commandDD float ro (only if debug=1)

Second derivative of command. This is the value that is multiplied by FF2 to produce the second order feed-forward term of the output.

pid.N.commandDDD float ro (only if debug=1)

Third derivative of command. This is the value that is multiplied by FF3 to produce the third order feed-forward term of the output.

## BUGS
Some people would argue that deadband should be implemented such that error is treated as zero if it is within the deadband, and be unmodified if it is outside the deadband. This was not done because it would cause a step in the transfer function equal to the size of the deadband. People who prefer that behavior are welcome to add a parameter that will change the behavior, or to write their own version of pid. However, the default behavior should not be changed.

Negative gains may lead to unwanted behavior. It is possible in some situations that negative FF gains make sense, but in general all gains should be positive. If some output is in the wrong direction, negating gains to fix it is a mistake; set the scaling correctly elsewhere instead.


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.236

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

title: pumakins(9)

text:
# pumakins(9)

See the file man9/kins.9.


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.


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

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

sample-hold.N.hold bit in

sample-hold.N.out s32 out

## 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

## 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.

## 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

serport.N.write

## 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

sim-parport.N.write

sim-parport.N.reset

## 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

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