Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: hodarthestrange on March 26, 2009, 08:18:30 PM

Title: Lathe Servo Spindle settings question
Post by: hodarthestrange on March 26, 2009, 08:18:30 PM
I have converted a small 8x12 lathe by adding steppers with G202's and new ball screws on the X and Y.The spindle has a  Nema 34 DC Brushed Servo from HomeShopCNC with a G320.
Bob Campbell breakout board and a Sound Logic Encoder board. E2 500 count encoders on all axis. Differential converters on the encoder lines to keep noise down.
X and y work fine. C index's fine. 11.11111 Steps per gives me 360 deg's  on the DRO.  Seems that might be a bit low of a number but it seems to work.
Now I set up the Spindle as a spindle and I believe I need to change the Steps per. so that 1 number of the dro is a full 360. To get that I have a Steps per of 4000. Now I am running at 45khz and that gives me a max limit of 675 In's per Min. Somewhere I read that 50 In per min was 3000 rpm. I am just not getting close to that If I set my spindle speed to 1000 I only get around 75 rpm. Haven't broke out the tach yet to check but its way to slow.
On ports and pins there is 4 encoders settings. I assume that's X,Y,Z,A. I just put the pin numbers in for the C axis in the 4th slot. Now where do I put the encoder information for the spindle? I am not getting any spindle feedback on the screen.


While on the subject of encoders. Is there a lathe screen that has X,Z,C with a spot for encoder feedback. I found a Mill screen that has XYZA but I need this for the lathe.

I'm not using The Sound Logic Dll because its not working for me. Want to get these other things addressed first. One small step at a time to keep it simple.

I have went through the manual but have not found or if I did find understand the info about the above questions. I also searched the forum with little success.

Donny
Title: Re: Lathe Servo Spindle settings question
Post by: Hood on March 26, 2009, 08:34:55 PM
500 line encoder is 2000 pulses per rev so that is what your Steps per should be unless you have some electronic gearing in the drive.
At 45KHz that would be a max of 45,000 x 60 = 2,700,000 pulses per min divide that by 2000 and you get a max RPM of 1350rpm
Not sure what you should enter for the velocity, with the SmoothStepper it is the rpm but with the PP it could be rps. Try first at 22.5 and if that only gets you slow speed then try with the 1350.
Hood
Title: Re: Lathe Servo Spindle settings question
Post by: Hood on March 26, 2009, 08:38:20 PM
Oh as for spindle feedback, you need the index pulse from the encoder and set it up as the Index on Ports and Pins, Inputs. However if you are using the parallel port you will probably find that the pulse is too short in duration so you can either stratch it electronically or fit a slotted disk with an optical switch.
Hood
Title: Re: Lathe Servo Spindle settings question
Post by: hodarthestrange on March 26, 2009, 09:30:12 PM
I didn't carry the index wire into the control box. Its at the plug I will just have to add it. No big deal. Just to see if it works. If not I have a few optical sensors laying around I think. I can do that. I did that on the last lathe I built. I was just hopeing the encoder would save a step.

The spindle has 2:1 gearing on it. Mechanical not Electronic. That is why I thought 4000 encoder counts not 2000.
Now if I put in 1000, 2000 or 4000 and jog the spindle in motor tuning I only get 650 rpm. Every time.  At every setting. On the Manual screen I have it set to 4000 rpm in the spindle setting. Under Pulley settings I have it set 0 to 4000 rpm.
What am I missing.

Donny

Title: Re: Lathe Servo Spindle settings question
Post by: Hood on March 26, 2009, 09:32:11 PM
What have you got set for the spindles velocity in Motor Tuning?
Hood
Title: Re: Lathe Servo Spindle settings question
Post by: Hood on March 26, 2009, 09:33:49 PM
Oh and if you are 4000 pulses per rev 675rpm  will be the max at 45KHz.
Hood
Title: Re: Lathe Servo Spindle settings question
Post by: hodarthestrange on March 26, 2009, 10:34:58 PM
At 2000 Velocity is 1350 Actual rpm 650
At 4000 Velocity is 675 Actual rpm is 650

Donny
Title: Re: Lathe Servo Spindle settings question
Post by: Hood on March 27, 2009, 04:00:24 AM
The max you will ever get with that encoder and 45KHz kernel is  675rpm.
Setting the steps per to 2000 or 4000 will not make a difference to that, where it would make a difference is the accuracy of the commanded speed to the true speed. The reason for that is it physically takes 4000 pulses to turn your spindle 1 revolution, if you command a S400 then Mach will roatate the spindle at 400 rpm. If however you had the Steps per set to 2000 it would only rotate half a rev for 2000 pulses so commanding a  s400 like before would result in a true speed of 200rpm.
Hood
Title: Re: Lathe Servo Spindle settings question
Post by: hodarthestrange on March 27, 2009, 12:16:20 PM
I can't seem to get over 650 rpm. Not 675. Would my calculations being wrong on the steps per be the difference?
   Now playing with the numbers in the Spindle Pulley screen: If I put a max speed 1000 then my actual speed is off. The only was I can get a accurate spindle speed is if I put in max speed is 650. Then when I type in a value of say 500 in the Manual screen I actually get 500 on my hand held tach. The Velocity in the Motor tuning page is set for 675.
If I put any other number in the Spindle Pulley configuration screen I get the wrong real numbers on the tach. WHY?

   Now how do I go about getting a faster spindle speed? Without changing my breakout boards etc. I spent allot of time and money setting all those up in my cabinet. I need increased speed without loss of resolution in the C axis Indexing.

Donny
Title: Re: Lathe Servo Spindle settings question
Post by: Hood on March 27, 2009, 12:31:08 PM
what is the spindle config page you are talking about?
Hood
Title: Re: Lathe Servo Spindle settings question
Post by: hodarthestrange on March 27, 2009, 04:39:04 PM
Same tab you click on tho get to ports and pins and to motor tuning. Close to the bottom of the list.

Donny

Title: Re: Lathe Servo Spindle settings question
Post by: Hood on March 27, 2009, 05:15:58 PM
I can't seem to get over 650 rpm. Not 675. Would my calculations being wrong on the steps per be the difference?

Calculations there wont affect the max RPM, it is purely kernel speed that will determine that. Steps per will determine the accuracy of the commanded to true though so if you had 2000 steps per rev and you actually need 4000 then your commanded speed would be double the true speed.
What it may be here is that your kernal speed is actually not a true 45KHz due to the computer you have, what does it say the pulserate is on the Diagnostics page, if it says around 43,333 you have your answer as 43,333 x 60 seconds /4000 = 650rpm

 
Quote
Now playing with the numbers in the Spindle Pulley screen: If I put a max speed 1000 then my actual speed is off. The only was I can get a accurate spindle speed is if I put in max speed is 650. Then when I type in a value of say 500 in the Manual screen I actually get 500 on my hand held tach. The Velocity in the Motor tuning page is set for 675.
If I put any other number in the Spindle Pulley configuration screen I get the wrong real numbers on the tach. WHY?

I do not understand this at all and that is why I queried which screen you were talking about. As far as I can remember I have not set this up and have just kept the default which I think is 5000 for pulley 1.

 
Quote
Now how do I go about getting a faster spindle speed? Without changing my breakout boards etc. I spent allot of time and money setting all those up in my cabinet. I need increased speed without loss of resolution in the C axis Indexing.

Only option is to go lower count  encoder or higher kernel. If my previous assumption regarding the true kernel speed is correct then increasing the kernel is unlikely to be an option. Lowwering the encoder count will hit on the resolution so the only other option I can see is to get a SmoothStepper which will allow you to get plenty of speed as it can pulse up to 4MHz.

Hood
Title: Re: Lathe Servo Spindle settings question
Post by: Hood on March 27, 2009, 05:26:34 PM
Oh thought I beter mention that there are some issues with the SmoothStepper and step/dir spindles at the moment. It does now work well for me  with the exception of CSS, that just doesnt work at all or rather it does work but is unuseable as it jerks and jumps around. This I have no doubt will get fixed in time but I suspect it will not happen until the work getting done on Mach at present is complete. This is for two reasons, firstly the Mach coding that is going on will make the  ease of integrating external devices easier to write a plugin for and also it will be much more responsive. Secondly because the Mach changes will more than likely not work with old plugins then it would be a waste of time Greg doing a lot of hard work only to have to redo it all in a month or so when hopefully the Mach upgrade is out.

Hood