Hello Guest it is March 29, 2024, 10:18:28 AM

Author Topic: step and direction spindle control  (Read 9129 times)

0 Members and 1 Guest are viewing this topic.

step and direction spindle control
« on: February 16, 2010, 07:02:11 PM »
Hello all, I am new to this forum.

I use a stepper for a work rotation spindle. I normally turn the work at about 350 rpm.

I am having trouble understanding the setup for this. I don't think what I have is working properly.

The velocity, by the manual, is rev's per second, which would mean I should set mine to 12.5. (750 rpm / 60 seconds) when I do this my stepper moves really slow when commanded to 60 rpm. If I bump it up to 750 for rev's per minute I get much faster speed, but not 60 rpm. If I continue to increase it the motor speed continues to go up, but if I increase it substantially, the motor tries to overspeed and stalls.

I would expect that the velocity would set a cap, and as long as I was under the cap, then my motor speed would be a function of the set rpm and the steps per unit for my motor and driver. If this is true, the changing the velocity would not affect the spindle speed unless i was commanding a speed in excess of the current velocity setting.

I'm hoping someone has been through this already.

Royce Bunnell
www.obcues.com

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: step and direction spindle control
« Reply #1 on: February 16, 2010, 07:13:35 PM »
I have servos on my lathe and mill spindles and a stepper on the coil winder. I however use a SmoothStepper on all of these machines and with it the Velocity is definitely Rev/min, so presuming it may well be the same for the parallel port.

Ok so here is how I think you should do it.
Steps per unit will be the amount of steps you need for  one revolution, for example your stepper may be 200 per rev and you have a 10 micro step drive so steps per unit would be 2000.
Velocity would be set to the Rev/min that you want (or can get) with a servo its easy as you know what the rated speed is but with a stepper it will be trial and error, so you say you run it at 350RPM so try that for a start and see.
 When you command a M3S350 that is what it should do, if you command M3S400 and you max velocity is 350 it should not attempt to do 400 but rather just go to 350, not sure if it will throw an error message or not.

Hood

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: step and direction spindle control
« Reply #2 on: February 16, 2010, 07:15:21 PM »
Oh and set the accel low for a start and work your way up.

Hood
Re: step and direction spindle control
« Reply #3 on: February 16, 2010, 07:24:53 PM »
hood,

Thanks for the input.

My steps per unit is 1600, (200x8) for a xylotex board.

If I set the velocity to 540, for 540 rpm, and I command 60 rpm (m3 s60) I get a particular speed from the spindle that seems much lower than 60 rpm. If I up the velocity to say 2000, then my spindle speeds up noticably with the same command. If I go up way high with the velocity, my motor will obviously attempt to go too fast and stall instantly.

My motor speed seems to be relative to the velocity as opposed to being limited by it.

Royce

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: step and direction spindle control
« Reply #4 on: February 16, 2010, 07:27:08 PM »
Are you using the parallel port or do you by chance have a SmoothStepper?
Hood
Re: step and direction spindle control
« Reply #5 on: February 16, 2010, 07:31:03 PM »
oops, I forgot to mention I am using a smooth stepper on this particular machine.

What started all this is the smooth stepper, but when I really look at all my machines, I have 4 of them, I don't think any of them are right. They will all change the rpm based on a change to the velocity.

weird!

Royce

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: step and direction spindle control
« Reply #6 on: February 16, 2010, 07:35:55 PM »
I thought it might be a SmoothStepper, I had issues with my Mill which I just finished recently and eventually Brian and I worked out where the problem was. I was having to set crazy steps per unit to get to the speed I wanted and couldnt understand why. Turns out that for some reason the SS looks at the Spindle Pulleys Max speed and takes that into the equation. So what you need to do is go to Config menu then Spindle pulleys and make sure you have the pulley set to the same Max as you have in Spindles motor tuning, also make sure the ratio is 1 if you are direct drive.
Hood
Re: step and direction spindle control
« Reply #7 on: February 16, 2010, 07:39:23 PM »
Hood,

OK, I will try that right now. Do I need to change all 15 pulleys? I will, and I will do it on both machines, one SS, and one Parallel port.

Be right back

Royce
Re: step and direction spindle control
« Reply #8 on: February 16, 2010, 07:47:33 PM »
OK

I set the pulley ratio to 1. The PP machine was already there, and the SS machine I had set to 100 for 100%. They are now both set to 1.
I didn't change all the pulleys, just the number one. I don't command any pulleys so I think this should do it. I set the pulley rpms to 500 as well as the velocities.

If I set the SS machine to 60 rpm, it looks pretty good. If I set it to 350 it stalls. I routinely run this speed on my other machines.

If I set the PP machine to 60 rpm it looks pretty good. If I set it to 350 it runs as expected as this machine has been running good for some time.

Now, if I go to the SS machine and command M3s350, I get an instant stall. If I go to 200 it runs, but is noticably faster than the PP machine.


I still have speed that is linear to the velocity as opposed to the gcode.

Royce

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: step and direction spindle control
« Reply #9 on: February 16, 2010, 07:55:52 PM »
Can you attach your xml for the SmoothStepper machine please.
Hood