Work with a spindle in RPM and degrees??

10 Sep 2009 21:46 #808 by ldmarsaglia
Hello, i would need to know if i can use a servo spindle as a normal spindle and also as a rotary axis to make accurate positioning in degrees mode?

The thing is that i need to do this without changing the machine configuration, and i don't know if this is possible without recompiling or something.

Well that's my question i thank you in advance :)

Kind regards.


Please Log in or Create an account to join the conversation.

11 Sep 2009 11:08 #810 by BigJohnT
By normal spindle do you mean control the spindle using M3, M4 & M5?
As a rotary axis you want to use A, B or C?

It seems to me there has been some discussion on this on the IRC or mailing list.

Off the top of my head I would guess that you could switch between the two using HAL.

What kind of machine is this and what does it do?


Please Log in or Create an account to join the conversation.

11 Sep 2009 12:43 #811 by robh
hi, how do you mean servo spindle?
is this an AC spindle motor( AC induction motor) with an inverter that is clear in terms of it can position the motor and hold it

or are we talking an AC servo motor like on axes ?

most commercial CNCs have a DC or AC spindle motor to do turning work, then disconnect that motor and connect a AC servo motor via clutch or other means to do the position work
using the main spindles encoder for locations (not the AC servo motors)
this is just one way it can and is done

as John said one can do this in hal, as i will soon have to do this with our new spindle drive which can position the spindle any where i care and hold it there (EMC will do work not the inverter)


Please Log in or Create an account to join the conversation.

11 Sep 2009 15:49 - 11 Sep 2009 15:50 #812 by ldmarsaglia
Hello, John and Robh, first of all thank you for your answer.

I've made a mistake saying that i need to use a spindle servo because this ones only work with analog input (at least the ones that i found here in my country).

The thing is that i need to make medium size lathe (500 mm between centers more or less), for machining non production parts. So i was thinking in order to improve the machining time and to make the machine cheaper, to use the spindle as a C axis like the commercial turning centers.

Here in my country there are several places which sell AC servo motors with drivers that have analog and step/dir inputs.

It would be nice if i can use in emc the spindle and the C axis in the same machine configuration without recompiling or modifying too much, because my knowledge about C and linux it's very basic, and i would like to start the tests with one servo motor before i start to make the entire machine.

I was thinking about using the same driver, (in the case that i find a servo motor that could handle the spindle work), wich have the analog and step inputs, and connect both inputs to the emc and then use it as a spindle and when a milling work is required, use the C axis, one at the time, (correct me if this is not possible or if it's dangerous for the servo drive).

Well, i hope i've been clear with my question and thanks again for the answers, you're very helpful as always :)

Best regards from Argentina.

Last edit: 11 Sep 2009 15:50 by ldmarsaglia.

Please Log in or Create an account to join the conversation.

11 Sep 2009 18:30 #813 by robh
Hi Leonardo

A drive with Analog input is going to serve you the best with a + & - voltage input to let u position and hold well.
what hardware are you going to be using to talk to the servo? Mesa card setup?

to make this work in simple terms u will need to modify the hal file and choose how best to change from "Spindle mode or commanded velocity" to a C axis mode (position mode) as you will have to switch spindle in and out of a PID loop i believe
best thing to do is pop on IRC and have a chat with guys in there they will be willing to give u some ideas to use im sure.

using an AC servo motor these general do not have much speed (2/3000rpm) as they are built for torque at a speed range. so size is going to depend on how much holding u need on C axis when milling or what ever you plan todo.
they should not mind about beeing ran at a speed for long times but do check on spec sheet or reseller id say keep them cool they should be fine.

Please Log in or Create an account to join the conversation.

15 Sep 2009 02:20 - 15 Sep 2009 02:22 #832 by ldmarsaglia
Hi robh, thanks again for your answer.

I'm planning to start the tests using a mesa m5i20, and here there is a store that sells an AC motor driver, wich has an autotuning function for the PID algorithm, i don't know if this kind of drivers are good or not, but the thing is that may be in the next days i will go there to see them.

The drivers apparently are made for all kind of AC motors (low,medium and high inertia), the only thing you need is to connect an encoder to the motor axis, and the driver itself sets the PID values calculating the inertia and stuff..

Anyway.. this kind of drivers have the two inputs Analog and Pulse, so i would like to try if they are good enough, to use it as a spindle motor and then change to a C axis.

By the way robh, you said that if i use a driver with +/- 10 volts input, and if i use it as a spindle in emc, can i change the position as i want?
If emc comes with that in the motmod it would be easier for me to make what i want, i have to research a little more because the only thing that i've made with my brother it was an old manual Schaudt camshaft grinder that we automated, and we didn't use the analog voltage protocol yet.

Sorry for the long posts but it's very exciting to get things like this working.

Thanks again for the help.

Last edit: 15 Sep 2009 02:22 by ldmarsaglia.

Please Log in or Create an account to join the conversation.

15 Sep 2009 07:48 #833 by robh

are you looking to position the spindle just tell it go to a position and hold/stop there
then do some milling, and so on
so just an indexing spindle lets call it

or do you want to rotate the spindle while doing some milling and make it a true C axes so u can contour around the part

Please Log in or Create an account to join the conversation.

18 Sep 2009 04:22 #840 by ldmarsaglia
Hello robh

What i need to do is as you said, to use the spindle as a real C axis and rotate the spindle at the same time the tool is milling.

I'm learning about C and reading the source files of emc, so i can begin to understand how it works and may be that would help me to modify some things to make what i really want to do.

Thanks again for your help.


Please Log in or Create an account to join the conversation.

Time to create page: 0.087 seconds
Powered by Kunena Forum