Scroll to navigation

SPINDLE(9) HAL Component 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

PINS

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.
Commanded spindle speed (in RPM)
Actual spindle speed from a spindle encoder (in RPS). If you do not have a spindle encoder set the simulate_encoder parameter to 1.
If you do not have an encoder, set this to 1.
If FALSE, the spindle is stopped at the gear's maximum deceleration.
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.
Current spindle speed in RPM.+ve = forward, -ve = reverse. Uses the encoder input if available. If not, uses a simulated encoder speed.
Absolute spindle speed in RPM. Useful for spindle speed displays.
Scaled output
Currently selected gear.
TRUE when the spindle is at speed
TRUE for forward rotation
TRUE for reverse rotation. Both forward and reverse are false when the spindle is stopped.
TRUE when decelerating
TRUE when the spindle is stationary
TRUE when the commanded spindle speed is >max or <min.

SEE ALSO

motion(9)

NOTES

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

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.

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.

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

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.

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.

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.

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

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

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

2024-07-13 LinuxCNC Documentation