[ Log In ]
[ Register ]
NEW: CNC Router PLANS Available for all of our Newest CNC Models!! Click here to "Design Your CNC".

Question #: 13233

Question: What settings does I use for controlling the spindle in StepCon/Linuxcnc?

Current Solution

LinuxCNC has excellent documents; however, I would like to offer our help in case you don't understand the information on that page. So, please use this FAQ (Question #: 13233) to state your questions by submitting additional information below.

The LinuxCNC spindle control page is found here: http://linuxcnc.org/docs/html/examples/spindle.html

Additional Information:
After reading the LinuxCNC page my first questions would be can the spindle be controlled by PWM signal? Also, what pin on the parallel port would I set to Spindle Enable and FRW?

Additional Information:
To connect your computer to the VFD, use a USB to RS-485 interface. RS-485 is just a serial interface protocol that uses standard 0 to +5 voltage TTL signal levels for communication (as opposed to RS-232 which uses -12v and +12 for signal level changes).

Get a high quality interface to reduce any issues during the process. The VFD should have two terminals labeled RS+ and RS-. The USB to RS-485 adapter should have this labeled on it as well so the connections should be relatively straight forward.

In the VFD parameters:
PD001: 2 to accept RS485 commands
PD002: 2 to accept frequency comands
PD163: 1 to RS485 slave address:1
PD164: 1 RS485 baud rate 9600
PD165: 3 8bit, no parity, 1 stop bit

Make sure LinuxCNC is also set accordingly:

The PIN14 and PIN16 in the stepconf wizard should be set to unused because you don't want LinuxCNC to be outputting unnecessary signals.

In the options step of the stepconf wizard:
- Check the Include Halui user interface component.
- Check the Include custom PyVCP GUI panel.
- Check Spindle speed display

You will want to edit the custom.hal text file located in the folder that was created from the stepconf wizard. Add these following lines:
loadusr -Wn vfd hy_vfd -n vfd -d /dev/ttyUSB0 -p none -r 9600
net spindle-cmd-rpm-abs => vfd.speed-command
net spindle-cw motion.spindle-forward => vfd.spindle-forward
net spindle-ccw motion.spindle-reverse => vfd.spindle-reverse
net on motion.spindle-on => vfd.spindle-on

The dev folder in linux is typically used for interfacing devices and peripherals to the computer as these devices are communicated by simple memory addresses and these files are linked directly to these addresses.

Under the custom_postgui.hal file, change this line:

from: sets spindle-at-speed true
to: net spindle-at-speed => cfd.spindle_at_speed

and add the line:

setp vfd.enable 1

When you start LinuxCNC, you will a spindle section with the reverse and forward buttons, a stop button and - and + buttons. Use these buttons to conform that the spindle is functioning properly. The spindle speed indicator in LinuxCNC will show the spindle speed and you can confirm that this is equal to the speed indicated on the VFD.


Credit for this helpful information goes to:


Additional information was also added by us to provide a better understanding.

Respond:

Other Possible Solutions to this Question

  • What relay should be used with your USB BOB for controlling mist/flood/spindle on/off?

    The relay that should be used with your USB BOB for controlling mist/flood/spindle on/off is one of the following options.

    You could get and use the Planet-CNC.com Output Board found here, http://www.planet-cnc.com/index.php?page=shop

    Or you could create your own setup using a resistor, solid state relay, transistor, and diode. You can watch this video, https://www.youtube.com/watch?feature=player_embedded&v=PJO_XoLL6lQ, to find out the correct way to accomplish this.

    Click the link to respond:
    What relay should be used with your USB BOB for controlling mist/flood/spindle on/off?

  • what are all the settings i'd need for mach3 for use with a blackfoot and a redfly?

    These are the recommend values(default) for our blackFoot CNC machine, the acceleration and velocity can be adjusted as high as the motor can rotate without stalling! Suggested increment's will be by 10's.

    blackFoot:
    X-axis
    “CW8060 (6.0A) Driver”
    Set to 1/16 Microstep, 5.43A
    Dipswitches: 01100110 (“0”=down, “1”=up)
    Mach3 Motor Tuning: 914.29 steps/in, Velocity 400.02, Acceleration 4
    Y-axis
    “CW230 (3.0A) Driver”
    Set to 1/16 Microstep, 2.7A
    Dipswitches: 11001100
    Mach3 Motor Tuning: 1422.22 steps/in, Velocity 400.02, Acceleration 4
    Z-axis
    “CW230 (3.0A) Driver”
    Set to 1/4 Microstep, 2.7A
    Dipswitches: 10101100
    Mach3 Motor Tuning: 1600 steps/in, Velocity 79.98, Acceleration 5

    Additional Information:
    how can we tuning the CNC motor

    Click the link to respond:
    what are all the settings i'd need for mach3 for use with a blackfoot and a redfly?

  • My Spindle has 4 pins but only the U, V and W terminals at used for the Spindle. What about the 4th pin?

    The terminals of U, V and W from the VFD (Variable Frequency Drive) connects to the three coils (first three pins of the connector) of the spindle. The 4th pin in the spindle is typically not connected; however, bring a wire from the PE (Protective Earth or Earth Ground) from the VFD and connect it to one of the screws of the connector on the spindle. This will ground the body of the spindle.

    Click the link to respond:
    My Spindle has 4 pins but only the U, V and W terminals at used for the Spindle. What about the 4th pin?

  • What kind of wire should I use between the invertor and the spindle?

    The type of wire that should be used between the spindle and the VFD (Variable Frequency Driver also called the inverter) should be of stranded type and we use between 18 and 16 AWG.

    The total current is divided among the three coil wires, therefor a wire gauge of 16 should be sufficient.

    Currently we use 20AWG 4 conductor.

    Additional Information:

    Click the link to respond:
    What kind of wire should I use between the invertor and the spindle?

  • Can you tell me what gauge wire is needed for limits switches and the spindle?

    The hookup wires you will need is 22 to 24 AWG stranded and shielded for the wiring of the limit switches and E_Stop. Our kit customers select various places for these switches, so we don't supply the wiring. If you don't use shielded cable, you will need to change the debounce setting in Mach3 (if that is the control program you are using).

    We typically use 14 AWG stranded wire for the VFD to Spindle (U, V, W) connections.

    Click the link to respond:
    Can you tell me what gauge wire is needed for limits switches and the spindle?

  • What 1/2" collet and nut do I use for the Greenbull with the 2KW spindle? I want to order the Onsrud Spoilboard surfacing cutter.
  • What are the dipswitch settings for the drivers?

    blueChick:

    X-axis
    “CW230 (3.0A) Driver”
    Set to 1/16 Microstep, 2.7A
    Dipswitches: 11001100
    Mach3 Motor Tuning: 1422.22 steps/in

    Y-axis
    “CW230 (3.0A) Driver”
    Set to 1/16 Microstep, 2.7A
    Dipswitches: 11001100
    Mach3 Motor Tuning: 1422.22 steps/in

    Z-axis
    “CW230 (3.0A) Driver”
    Set to 1/4 Microstep, 2.7A
    Dipswitches: 10101100
    Mach3 Motor Tuning: 1600 steps/in

    blackToe:

    X-axis
    “CW230 (3.0A) Driver”
    Set to 1/16 Microstep, 2.7A
    Dipswitches: 11001100
    Mach3 Motor Tuning: 1422.22 steps/in

    Y-axis
    “CW230 (3.0A) Driver”
    Set to 1/16 Microstep, 2.7A
    Dipswitches: 11001100
    Mach3 Motor Tuning: 1422.22 steps/in

    Z-axis
    “CW230 (3.0A) Driver”
    Set to 1/4 Microstep, 2.7A
    Dipswitches: 10101100
    Mach3 Motor Tuning: 1600 steps/in

    blackFoot:

    X-axis
    “CW8060 (6.0A) Driver”
    Set to 1/16 Microstep, 2.7A
    Dipswitches: 11001100 (“0”=down, “1”=up)
    Mach3 Motor Tuning: 914.29 steps/in

    Y-axis
    “CW230 (3.0A) Driver”
    Set to 1/16 Microstep, 2.7A
    Dipswitches: 11001100
    Mach3 Motor Tuning: 1422.22 steps/in

    Z-axis
    “CW230 (3.0A) Driver”
    Set to 1/4 Microstep, 2.7A
    Dipswitches: 10101100
    Mach3 Motor Tuning: 1600 steps/in

    greenBull:

    X-axis
    “CW8060 (6.0A) Driver”
    Set to 5.43A, 1/16 Microstep
    Dipswitches: 01100110 (“0”=down, “1”=up)
    Mach3 Motor Tuning: 914.29 steps/in

    Y-axis
    “CW8060 (6.0A) Driver”
    Set to 5.43A, 1/16 Microstep
    Dipswitches: 01100110
    Mach3 Motor Tuning: 914.29 steps/in

    Z-axis
    “CW8060 (6.0A) Driver”
    Set to 5.43A, 1/4 Microstep
    Dipswitches: 01100100
    Mach3 Motor Tuning: 1600 steps/in


    Scratch-Build / Book-Build Kit:

    X-axis
    “CW230 (3.0A) Driver”
    Set to 1/4 Microstep, 2.7A
    Dipswitches: 10101100 (“0”=down, “1”=up)
    Mach3 Motor Tuning: 1600 steps/in

    Y-axis
    “CW230 (3.0A) Driver”
    Set to 1/4 Microstep, 2.7A
    Dipswitches: 10101100
    Mach3 Motor Tuning: 1600 steps/in

    Z-axis
    “CW230 (3.0A) Driver”
    Set to 1/4 Microstep, 2.7A
    Dipswitches: 10101100
    Mach3 Motor Tuning: 1600 steps/in

    Additional Information:


    Additional Information:
    Scratch built/book CNC with NEMA 34 motors and CW8060 microstep driver

    Additional Information:

    Click the link to respond:
    What are the dipswitch settings for the drivers?

  • What size of wire do you use to connect the VFD to the spindle?

    The type of wire that should be used between the spindle and the VFD (Variable Frequency Driver also called the inverter) should be of stranded type and we use between 18 and 16 AWG.

    The total current is divided among the three coil wires, therefor a wire gauge of 16 should be sufficient.

    Currently we use 20AWG 4 conductor.

    Additional Information:

    Click the link to respond:
    What size of wire do you use to connect the VFD to the spindle?

  • What brand is the 2.2 kW spindle? Same for the VFD. Thanks.

    Spindles are generally covered up to 1 year after date of purchase. We do not repair them in house, but we do work with our manufacturer to replace defective units. Generally if you have a defective unit covered under warranty, we will issue a replacement.

    Click the link to respond:
    What brand is the 2.2 kW spindle? Same for the VFD. Thanks.

  • what is the packing list for the laser/spindle combo head

    The laser/spindle combo head includes the following major items:

    Spindle components:
    - The Spindle and VFD (Variable Frequency Drive) also called an inverter.

    Laser components:
    - 40 watt laser tube.
    - Laser nozzle with laser focus lens (20 mm).
    - nozzle tube fitting with 36 inches of silicone tubing.
    - 40 watt laser power supply.
    - Potentiometer (panel mount) to adjust laser intensity.
    - Toggle switch (on/off SPST - Single Pole Single Throw).
    - Air pump to provide air assist to keep debris out of the nozzle.

    Structure and hardware:
    - All structural parts to form the z-axis rail support and mounts for the spindle and laser tube/nozzle, vacuum hose and dust shoe
    - 1/2" - 10 TPI 5 starts lead screw (2 turns per inch).
    - Many screws/nuts/cross dowels.
    - Dust shoe with installed strip brush.
    - Aluminum angle to serve as rail.

    Click the link to respond:
    what is the packing list for the laser/spindle combo head

  • What length of wire do you recommend for the black toe (2'x4') between the spindle and VFD?

    The length of the cable from the VFD (Variable Frequency Drive) to the actual spindle should be about the same as the z-axis cable from the z-axis motor to the z-axis driver which is recommended at 11 feet. This is locating the VFD about at the midpoint of the machine.

    Click the link to respond:
    What length of wire do you recommend for the black toe (2'x4') between the spindle and VFD?

  • I am interested in buying the water cooled 2.2 KW spindle for $339, how much does it weigh?

    The weight of the 2.2kW spindle without the VFD (variable frequency drive or inverter) is 11 lbs or 5 kg.

    The 2.2kW spindle with the VFD is 15 lbs or 6.8 kg.

    Additional Information:

    Click the link to respond:
    I am interested in buying the water cooled 2.2 KW spindle for $339, how much does it weigh?

  • What are the configuration settings for VFD for Spindle 1.5kW 110V. The search settings have a link for a 2.2kw spindle so I'm afraid they are the wrong ones and I don't want to fry the spindle. My VFD is an Huanyang HY01D511B.

    Did you get a manual for your VFD? Where did you purchase the VFD and spindle?

    Additional Information:
    I bought the VFD through Amazon with a similar spindle that you sell. The VFD came with a manual but unfortunately the spindle had all the model number and specs scratched off of it. In an attempt to set it up, I fried the spindle. I have complained to the vendor and to Amazon but have received no solution. If your spindle arrives with proper documentation I probably can set it up myself.

    Click the link to respond:
    What are the configuration settings for VFD for Spindle 1.5kW 110V. The search settings have a link for a 2.2kw spindle so I'm afraid they are the wrong ones and I don't want to fry the spindle. My VFD is an Huanyang HY01D511B.

  • What is the minimum RPM for the 2.2kW spindle?

    Spindles with 2 poles, which is typically for these types of spindles will have a minimum RPM of 6000 RPM or 100Hz; however, I would not run the spindle below 15000 RPM or 250Hz to give a safety factor and no damage will occur.

    If you have a 4 pole spindle, then much lower RPMs can be achieved, and with higher torque than a 2 pole spindle. The 4 pole spindle will require more power than 2 pole spindles and will not be able to achieve as high maximum RPMs.

    Click the link to respond:
    What is the minimum RPM for the 2.2kW spindle?

  • Does the 2.2 kilowatt spindle have an internal thermal cutout if it overheats because of failed pump?

    The spindle does not provide feedback of temperature to the VFD (Variable Frequency Drive). The connection to the spindle is solely to drive the coils in the spindle. The VFD has many features, but is mainly to control the spindle at various frequencies and to be controlled by software.

    It is important to always monitor the pump's working condition so the spindle has sufficient cooling.

    Click the link to respond:
    Does the 2.2 kilowatt spindle have an internal thermal cutout if it overheats because of failed pump?

  • What size collet can the 2.2kW spindle use?

    All of our spindles come standard with a 1/4" collet. The 2.2kw, and 4.0kw, can be upgraded to a 1/2" collet with a separate purchase.

    Click the link to respond:
    What size collet can the 2.2kW spindle use?

  • I'VE BUFFERED A PWM SIGNAL TO 0-10V ANALOG AND I WOULD LIKE USE THAT RUN YOUR 110V 2.2KW SPINDLE VFD. COULD YOU PLEASE DETAIL THE CORRECT WIRING VFD SETTINGS GET WORKING?

    This will depend on the VFD you have to identify the correct terminal. The terminal on the VFD will be labeled AI1 typically (Analog Input #1). You will also need to make sure to complete the PWM circuit using the GND terminal on the VFD.

    Additional Information:
    I have wired my 0-10V signal to the AI1 and GND terminals as suggested. I have also set the PD-01 and PD-02 settings to 1. Still nothing. Is there something else that I am missing?

    Additional Information:
    Thanks for the information. Can you let me know the model of the VFD that you have?

    Additional Information:
    VFD Model # YL600-2S-2K20

    Additional Information:
    Thanks. I will check our resources and documentation to see if there is another programming setting that needs to be changed.

    Additional Information:
    Does your VFD have a VI terminal?

    Additional Information:
    No, it does not. The terminals for this VFD are as follows (seperated by dashes "-").

    10V-AI1-AO2-PLC-DI5-DI3-DI1-COM
    AI2-GND-AO1-DI6-DI4-DI2-FM-24V

    Additional Information:
    Do you have a PD070 parameter?

    PD070 is the main Analog Input parameter.

    The options for that parameter is:
    0: 0-10V
    1: 0-5V
    2: 0-20mA
    3: 4-20mA
    4: 0-10V (4-20mA Stacked)
    5: XIA
    6: (VI+XIA)/2
    7: (3VA+XIA)/4
    8: (XIA_XIB)/2
    9: Max (XIA, XIB)
    10: Min (XIA, XIB)


    Additional Information:
    There is a PD-00 thru PD-09. PD-07 is currently set to 0.

    Additional Information:
    It appears that the manual I’m using “Titled YL600” is not the same as your unit. I will check our manuals and find the one that has only PD-00 to PD-09.

    Additional Information:
    For that VFD, the parameters are P0. The 0 may look like a D on the display.

    The parameters that need to be changed for the AI1 to work (Brackets [] around the correct selection):

    P0-01: First Motor Control Mode
    - 0: Sensorless Vector Control
    - 1: Flux Vector Control (FVC)
    - [2]: V/F Control

    P0-02: Options of Command Source
    - 0: Operation Panel Command Channel (LED will be off)
    - [1]: Terminal Command Channel (LED will be on)
    - 2: Communication Command Channel (LED will flicker)

    P0-03: Options of Principle Frequency Source X
    - 0: Digital Setting (Preset Frequency P0-08, UP/DOWN modifiable, no power-down memory)
    - 1: Digital Setting (Preset Frequency P0-08, UP/DOWN modifiable, with power-down memory)
    - [2]: AI1
    - 3: AI2
    - 4: AI3
    - 5: Pulse Setting (DI5)
    - 6: Multi Speed Instruction
    - 7: Simple PLC
    - 8: PID (Proportional Integral Derivative Control)
    - 9: Communication Given

    P0-11: Upper Limit Frequency Source
    - 0: P0-12 (Make sure the P0-12 parameter has the correct max frequency if used)
    - [1]: AI1
    - 2: AI2
    - 3: AI3
    - 4: Pulse Setting
    - 5: Communication Given

    P0-27: Command Source Bundle with Frequency Sources
    Single Digit: Options of Operation Panel Command Bundle with Frequency Sources
    - 0: No Bundling
    - 1: Digital Setting Frequency
    - [2]: AI1
    - 3: AI2
    - 4: AI3
    - 5: Pulse Setting (DI5)
    - 6: Multi Speed Instruction
    - 7: Simple PLC
    - 8: PID
    - 9: Communication Given
    Double Digit: Options of Terminal Command Bundle with Frequency Sources
    Hundred Place: Options of Communication Command Bundle with Frequency Sources
    Kilobit: Options of Automatic Operation Bundle with Frequency Sources

    P2-09: Upper Limit Source of Lower Torque Under Speed Control Mode
    - 0: Function Code P2-10 Setting
    - [1]: AI1
    - 2: AI2
    - 3: AI3
    - 4: Pulse Setting
    - 5: Communication Given
    - 6: MIN (Al1, Al2)
    - 7: MAX (Al1, Al2)
    - Maximum range for options 1-7, accords with P2-10

    If you elect to use a different AI#, then configure the parameters (P0-03, P0-11, P0-27 and P2-09) accordingly.

    Click the link to respond:
    I'VE BUFFERED A PWM SIGNAL TO 0-10V ANALOG AND I WOULD LIKE USE THAT RUN YOUR 110V 2.2KW SPINDLE VFD. COULD YOU PLEASE DETAIL THE CORRECT WIRING VFD SETTINGS GET WORKING?

  • What power supply do you recommend for the spindle and limit switches if I buy the USB Mach3 breakout board?

    Any of the following power supplies will be fine for powering the Mach3 USB controller:
    https://www.buildyourcnc.com/item/24v

    however, the limit switches do not need high current, so the following power supply is sufficient for the task of connecting limit switches:
    https://www.buildyourcnc.com/item/electronicsAndMotors-power-supply-24v-1a-dc

    Click the link to respond:
    What power supply do you recommend for the spindle and limit switches if I buy the USB Mach3 breakout board?

  • What are the toggle switch settings on the stepper motor drivers for the .5 in. lead screw 10 tpi 2 turns per inch? Thankyou!

    On the top of the stepper motor drivers is a grid with the appropriate toggle switch positions for the lead screw being used. If it is 2 turns per inch, the proper toggle switch positions would be 01101110. Try this and see if it works.

    Click the link to respond:
    What are the toggle switch settings on the stepper motor drivers for the .5 in. lead screw 10 tpi 2 turns per inch? Thankyou!