Spindle in Mach 3

pescadoman

Randy
Silver Member
Got the Gecko....wired it up....XYZ works in jog... I can't get the spindle switched to spin the shaft. I'm pretty sure I got the pins correct, but being the doofus I am it still doesn't work...
 
The A axis is a rotary axis. You will not be using the A axis for turning, as it is for indexing and rotary milling applications. Do you have an A axis servo connected?

I would think to simply turn on the spindle,,,,,,,,,just use the spindle on switch.
 
Last edited:
The A axis is a rotary axis. You will not be using the A axis for turning, as it is for indexing and rotary milling applications. Do you have an A axis servo connected?

I would thing to simply turn on the spindle,,,,,,,,,just use the spindle on switch.

Machine is a cnc shaft machine. all the rotational axis needs to do is rotate. I should have been more specific.
 
The A axis is a rotary axis. You will not be using the A axis for turning, as it is for indexing and rotary milling applications. Do you have an A axis servo connected?

I would thing to simply turn on the spindle,,,,,,,,,just use the spindle on switch.

yes you can use it as a spindle motor. I have a set up that way on my taper machine and I use it all the time.
 
Last edited:
Randy

Ok, I'll go through it from top to bottom.

1. Mach3, Config, Ports and pins, Motor outputs, Spindle
Check the Enabled box
Step pin 8 (assuming you are using the "A" driver on the G540)
Dir pin 9 (assuming you are using the "A" driver on the G540)
both ports the same as your other axis

2. Mach3, Config, Motor Tuning, Spindle
Steps per is 2000
Velocity or speed to 1000
Accelleration to about 6

3. Mach3, Config, Spindle Pulleys, Pulley1 through pulley4
Set min speed to 0
Set max speed to 1000
Set ratio to 1

4. Mach3, Config, Ports and pins, Spindle Setup, Motor Control,
Use Spindle Motor Output checked
Step/Dir Motor checked

5. After all this is done, don't try anything before you shut down Mach, save any fixture changes, and restart Mach. Mach is funny about when changes are taken in.


I'm pretty sure that will do it.

If the motor turns the wrong direction, then change the Direction Low Active in the Motor Tuning section for the spindle axis.

The thing I fought for years was making the speed right. Mach is goofy about how it determines the speed. Basically, it works like this.

Mach takes the requested speed, say 250rpm, and compares that to the max pulley speed. Mach sees the requested speed is 25% of the max, and multiplies the motor velocity by that number. If your motor velocity matches the max pulley speed, and the ratio is 1, then your speed will match the RPM requested. You can use F5 to turn the spindle on and off, or you can do it with G code. The S command will set the RPM, and M03 and M04 will turn the spindle clockwise and counterclockwise. M05 will stop the spindle, as will M30 at the end of your code.

I hope that helps. If not you can try to call me, but I'm pretty tough to get right now with the SBE coming up.
 
Last edited:
Randy

Ok, I'll go through it from top to bottom.

1. Mach3, Config, Ports and pins, Motor outputs, Spindle
Check the Enabled box
Step pin 8 (assuming you are using the "A" driver on the G540)
Dir pin 9 (assuming you are using the "A" driver on the G540)
both ports the same as your other axis

2. Mach3, Config, Motor Tuning, Spindle
Steps per is 2000
Velocity or speed to 1000
Accelleration to about 6

3. Mach3, Config, Spindle Pulleys, Pulley1 through pulley4
Set min speed to 0
Set max speed to 1000
Set ratio to 1

4. Mach3, Config, Ports and pins, Spindle Setup, Motor Control,
Use Spindle Motor Output checked
Step/Dir Motor checked

5. After all this is done, don't try anything before you shut down Mach, save any fixture changes, and restart Mach. Mach is funny about when changes are taken in.


I'm pretty sure that will do it.

If the motor turns the wrong direction, then change the Direction Low Active in the Motor Tuning section for the spindle axis.

The thing I fought for years was making the speed right. Mach is goofy about how it determines the speed. Basically, it works like this.

Mach takes the requested speed, say 250rpm, and compares that to the max pulley speed. Mach sees the requested speed is 25% of the max, and multiplies the motor velocity by that number. If your motor velocity matches the max pulley speed, and the ratio is 1, then your speed will match the RPM requested. You can use F5 to turn the spindle on and off, or you can do it with G code. The S command will set the RPM, and M03 and M04 will turn the spindle clockwise and counterclockwise. M05 will stop the spindle, as will M30 at the end of your code.

I hope that helps. If not you can try to call me, but I'm pretty tough to get right now with the SBE coming up.

Your the man Royce. +1 for you..
 
Back
Top