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