Hello Guest it is March 20, 2023, 08:40:33 PM

### Author Topic: Spindle servo on lathe is 10% fast  (Read 3088 times)

0 Members and 1 Guest are viewing this topic.

#### joeaverage

• 7,426
##### Re: Spindle servo on lathe is 10% fast
« Reply #10 on: April 13, 2018, 03:07:22 AM »
Hi,
that story rather puts CNCing as a hobby or a job into perspective. I hope your recovery progresses, it sounds that while you have come a long way it is still a long road.

I play Bridge recreationally and its a competetive game and I have a phrase, 'Bridge, its only a game...its not life or death....its more important than that!' While the humour is fun
its not in fact 'life or death'.

Using a modern AC servo as a spindle  puts you at the leading edge performance. You will, once you get it sorted and provided you remain within the torque limits of the servo
have a spindle with speed/position stability the envy of many.

Craig
My wife left with my best friend...
and I miss him!

#### DMBGO

• 201
• Time is the same in a relative way
##### Re: Spindle servo on lathe is 10% fast
« Reply #11 on: April 14, 2018, 08:56:01 PM »
Yes, it is only a hobby, but at times one gets caught up in the moment and it seems more important in the grand scheme of things than it really is. I am interested however when you say:

"Using a modern AC servo as a spindle  puts you at the leading edge performance. You will, once you get it sorted and provided you remain within the torque limits of the servo have a spindle with speed/position stability the envy of many."

This implies that once you do have a accurate, controllable, spindle that more can be done with it than previously. I have seen a YouTube video of someone using parametric G Code to turn a hexagonal shape on a lathe, do you have any idea of this?
Cheers

David

#### DMBGO

• 201
• Time is the same in a relative way
##### Re: Spindle servo on lathe is 10% fast
« Reply #12 on: April 14, 2018, 09:06:10 PM »
Here is an example of what I was talking about:
Cheers

David

#### joeaverage

• 7,426
##### Re: Spindle servo on lathe is 10% fast
« Reply #13 on: April 14, 2018, 09:27:15 PM »
Hi,
yes I have seen it, very impressive.  More of a party trick than a production technique.

Your spindle should do that.  Writing the Gcode for it would be a challenge.
Do you use Mach3 or Mach4?

I think the way to go about it is to call your spindle an A axis so that you can have coordinated rotation and cutting depth with the X axis. Success will depend heavily on the acceleration
of the X axis, if it can't accelerate quickly the hexagon will get rounded.

Craig
My wife left with my best friend...
and I miss him!

#### DMBGO

• 201
• Time is the same in a relative way
##### Re: Spindle servo on lathe is 10% fast
« Reply #14 on: April 14, 2018, 09:40:30 PM »
Yes, a combination of both the acceleration of the "A" axis and the X axis, may not have to be extremely fast acceleration though, just V well coordinated.

I am using M3, but I have an M4 license. I was initially V keen at converting to M4, but I use an ESS, which for a long time did not support threading on the lathe. The impetus to change to M4 has became a bit cooler over the intervening years.

I am still happy to M4 a try, but I need a reason to.
Cheers

David

#### joeaverage

• 7,426
##### Re: Spindle servo on lathe is 10% fast
« Reply #15 on: April 14, 2018, 09:52:59 PM »
Hi,
the Mach4 ESS plugin still does not support lathe threading but it is still progressing. Warp9 have decided that they wish to have multi-pulse per rev encoder capability and that has put them back
a bit. It may be a case of one step forwards but two backwards. It is happening though.

This hexagonal machining problem does not require Mach4.

The reason I ask is because if I have to write code I will not be writing VB, I will be writing Lua.

I will come back with some ideas about the Gcode necessary for the hexagonal machining trick.

Craig
My wife left with my best friend...
and I miss him!

#### joeaverage

• 7,426
##### Re: Spindle servo on lathe is 10% fast
« Reply #16 on: April 14, 2018, 10:53:41 PM »
Hi Dave,
got some ideas....

The attached pi shows a segment of the required hexagon, the longest dimension R. As it rotates about the center by angle theta the resulting triangle has longest side of R still but a somewhat shorter side Rprime.
The sine rule allows us to define a relation between the angle theta and Rprime, and of course Pprime is the X coordinate of your lathe.

A table of results might make it clearer:

theta         Rprime
0               R
5               0.955 X R
10             0.927 X R
15             0.896 X R
20             0.879 X R
25             0.869 X R
30             0.866 X R
35             0.869 X R
40             0.879 X R
45             0.896 X R
50             0.927 X R
55             0.955 X R
60             R

Clearly this works only for theta on the range 0 to 60 degrees, but all the rest of the hexagonal sectors are identical.

We could just write Gcode as a series of moves between the A axis and X axis, much like in the table or could do the calculation in a macro. The macro would be more fun but I'm
writing in Lua which is not going to make much sense to you.

You know you bloody Aussies ought to try to keep up!

What do you think?

Craig
My wife left with my best friend...
and I miss him!

#### joeaverage

• 7,426
##### Re: Spindle servo on lathe is 10% fast
« Reply #17 on: April 21, 2018, 07:37:41 PM »
Hi Dave,
I have a little bit of code here, its just a table of moves between A and X axes over a 60 degree segment of the A axis.
Its R dimension is 25mm, so your hexagon would be 50mm across the points.

Code: [Select]
`G1 A0.0  X24.9975G1 A0.5  X24.875G1 A1.0  X24.7525G1 A1.5  X24.635G1 A2.0  X24.52G1 A2.5  X24.4075G1 A3.0  X24.2975G1 A3.5  X24.19G1 A4.0  X24.0875G1 A4.5  X23.985G1 A5.0  X23.8875G1 A5.5  X23.7925G1 A6.0  X23.6975G1 A6.5  X23.6075G1 A7.0  X23.52G1 A7.5  X23.4325G1 A8.0  X23.35G1 A8.5  X23.2675G1 A9.0  X23.19G1 A9.5  X23.1125G1 A10.0 X23.04G1 A10.5 X22.9675G1 A11.0 X22.8975G1 A11.5 X22.83G1 A12.0 X22.7625G1 A12.5 X22.7G1 A13.0 X22.64G1 A13.5 X22.58G1 A14.0 X22.5225G1 A14.5 X22.4675G1 A15.0 X22.4125G1 A15.5 X22.3625G1 A16.0 X22.3125G1 A16.5 X22.265G1 A17.0 X22.22G1 A17.5 X22.175G1 A18.0 X22.1325G1 A18.5 X22.0925G1 A19.0 X22.055G1 A19.5 X22.0175G1 A20.0 X21.985G1 A20.5 X21.95G1 A21.0 X21.92G1 A21.5 X21.89G1 A22.0 X21.8625G1 A22.5 X21.8375G1 A23.0 X21.8125G1 A23.5 X21.79G1 A24.0 X21.77G1 A24.5 X21.75G1 A25.0 X21.7325G1 A25.5 X21.7175G1 A26.0 X21.7025G1 A26.5 X21.69G1 A27.0 X21.68G1 A27.5 X21.67G1 A28.0 X21.6625G1 A28.5 X21.6575G1 A29.0 X21.6525G1 A29.5 X21.65G1 A30.0 X21.65G1 A30.5 X21.65G1 A31.0 X21.6525G1 A31.5 X21.6575G1 A32.0 X21.6625G1 A32.5 X21.67G1 A33.0 X21.68G1 A33.5 X21.69G1 A34.0 X21.7025G1 A34.5 X21.7175G1 A35.0 X21.7325G1 A35.5 X21.75G1 A36.0 X21.77G1 A36.5 X21.79G1 A37.0 X21.8125G1 A37.5 X21.8375G1 A38.0 X21.8625G1 A38.5 X21.89G1 A39.0 X21.92G1 A39.5 X21.95G1 A40.0 X21.985G1 A40.5 X22.02G1 A41.0 X22.055G1 A41.5 X22.0925G1 A42.0 X22.135G1 A42.5 X22.175G1 A43.0 X22.22G1 A43.5 X22.265G1 A44.0 X22.3125G1 A44.5 X22.3625G1 A45.0 X22.415G1 A45.5 X22.4675G1 A46.0 X22.5225G1 A46.5 X22.58G1 A47.0 X22.64G1 A47.5 X22.7G1 A48.0 X22.765G1 A48.5 X22.83G1 A49.0 X22.8975G1 A49.5 X22.9675G1 A50.0 X23.04G1 A50.5 X23.115G1 A51.0 X23.19G1 A51.5 X23.27G1 A52.0 X23.35G1 A52.5 X23.435G1 A53.0 X23.52G1 A53.5 X23.6075G1 A54.0 X23.7G1 A54.5 X23.7925G1 A55.0 X23.8875G1 A55.5 X23.9875G1 A56.0 X24.0875G1 A56.5 X24.1925G1 A57.0 X24.3G1 A57.5 X24.4075G1 A58.0 X24.52G1 A58.5 X24.635G1 A59.0 X24.755G1 A59.5 X24.875G1 A60.0 X25`
It doesn't have any Feed word or any Z moves. Study it at see what you think.

Craig
My wife left with my best friend...
and I miss him!

#### DMBGO

• 201
• Time is the same in a relative way
##### Re: Spindle servo on lathe is 10% fast
« Reply #18 on: April 30, 2019, 05:05:26 AM »
Craig I'm very sorry, but your posts somehow slipped through tho the keeper. I had stopped thinking about the hexagon turning and moved onto my 3d printer, but I can always come back . I'll have a read tomorrow and reply.
Cheers
Dave

Hi Dave,
I have a little bit of code here, its just a table of moves between A and X axes over a 60 degree segment of the A axis.
Its R dimension is 25mm, so your hexagon would be 50mm across the points.

Code: [Select]
`G1 A0.0  X24.9975G1 A0.5  X24.875G1 A1.0  X24.7525G1 A1.5  X24.635G1 A2.0  X24.52G1 A2.5  X24.4075G1 A3.0  X24.2975G1 A3.5  X24.19G1 A4.0  X24.0875G1 A4.5  X23.985G1 A5.0  X23.8875G1 A5.5  X23.7925G1 A6.0  X23.6975G1 A6.5  X23.6075G1 A7.0  X23.52G1 A7.5  X23.4325G1 A8.0  X23.35G1 A8.5  X23.2675G1 A9.0  X23.19G1 A9.5  X23.1125G1 A10.0 X23.04G1 A10.5 X22.9675G1 A11.0 X22.8975G1 A11.5 X22.83G1 A12.0 X22.7625G1 A12.5 X22.7G1 A13.0 X22.64G1 A13.5 X22.58G1 A14.0 X22.5225G1 A14.5 X22.4675G1 A15.0 X22.4125G1 A15.5 X22.3625G1 A16.0 X22.3125G1 A16.5 X22.265G1 A17.0 X22.22G1 A17.5 X22.175G1 A18.0 X22.1325G1 A18.5 X22.0925G1 A19.0 X22.055G1 A19.5 X22.0175G1 A20.0 X21.985G1 A20.5 X21.95G1 A21.0 X21.92G1 A21.5 X21.89G1 A22.0 X21.8625G1 A22.5 X21.8375G1 A23.0 X21.8125G1 A23.5 X21.79G1 A24.0 X21.77G1 A24.5 X21.75G1 A25.0 X21.7325G1 A25.5 X21.7175G1 A26.0 X21.7025G1 A26.5 X21.69G1 A27.0 X21.68G1 A27.5 X21.67G1 A28.0 X21.6625G1 A28.5 X21.6575G1 A29.0 X21.6525G1 A29.5 X21.65G1 A30.0 X21.65G1 A30.5 X21.65G1 A31.0 X21.6525G1 A31.5 X21.6575G1 A32.0 X21.6625G1 A32.5 X21.67G1 A33.0 X21.68G1 A33.5 X21.69G1 A34.0 X21.7025G1 A34.5 X21.7175G1 A35.0 X21.7325G1 A35.5 X21.75G1 A36.0 X21.77G1 A36.5 X21.79G1 A37.0 X21.8125G1 A37.5 X21.8375G1 A38.0 X21.8625G1 A38.5 X21.89G1 A39.0 X21.92G1 A39.5 X21.95G1 A40.0 X21.985G1 A40.5 X22.02G1 A41.0 X22.055G1 A41.5 X22.0925G1 A42.0 X22.135G1 A42.5 X22.175G1 A43.0 X22.22G1 A43.5 X22.265G1 A44.0 X22.3125G1 A44.5 X22.3625G1 A45.0 X22.415G1 A45.5 X22.4675G1 A46.0 X22.5225G1 A46.5 X22.58G1 A47.0 X22.64G1 A47.5 X22.7G1 A48.0 X22.765G1 A48.5 X22.83G1 A49.0 X22.8975G1 A49.5 X22.9675G1 A50.0 X23.04G1 A50.5 X23.115G1 A51.0 X23.19G1 A51.5 X23.27G1 A52.0 X23.35G1 A52.5 X23.435G1 A53.0 X23.52G1 A53.5 X23.6075G1 A54.0 X23.7G1 A54.5 X23.7925G1 A55.0 X23.8875G1 A55.5 X23.9875G1 A56.0 X24.0875G1 A56.5 X24.1925G1 A57.0 X24.3G1 A57.5 X24.4075G1 A58.0 X24.52G1 A58.5 X24.635G1 A59.0 X24.755G1 A59.5 X24.875G1 A60.0 X25`
It doesn't have any Feed word or any Z moves. Study it at see what you think.

Craig
Cheers

David

#### Hood

• 25,835
• Carnoustie, Scotland
##### Re: Spindle servo on lathe is 10% fast
« Reply #19 on: May 02, 2019, 03:41:57 AM »
Spindle pulleys in Mach is where you set the max velocity and any gear ratio.