Hello Guest it is December 14, 2019, 12:16:40 AM

Author Topic: AC servomotor calibration problem  (Read 2866 times)

0 Members and 1 Guest are viewing this topic.

AC servomotor calibration problem
« on: September 01, 2017, 09:58:24 AM »
Hello all, i am new in here so i am not even sure this is the right place to ask, but here goes...

I am trying to setup a Bosch Ecodrive AC servo driver and motor as main spindle on a lathe. My problem is that when i try to setup this servo in motor tuning i can´t get the motor to run the actual rpm as i ask it to within mach3.

The servo is setup to work in step/dir mode, so i guess that it should be spot on with the rpm if correct set up. And by the way the actual speed on screen says 0, so do i have to install a tachometer setup even i use step/dir ?

Been reading different things about the value in velocity option, one is that this is the max speed the motor is designed for, another is that you need to take max speed and divide it with 60 to set the speed.

Tried both and neither is working. It runs but way off regarding the rpm. So anyone who can help me with this?

Another thing is that the motor is quite noisy and sounds like you can hear every single step. This gets better when i raise the step pr. rev. but to get the sound real good i would have to set it so high that mach3 can´t keep up and cuts down on the velocity. When i jog with the drivers internally jog button the motor does not make any sounds at all. Thinking to buy a smoothstepper to get more pulses because the servos driver accepts up to like 65000 pulses pr rev. Am i going in the right direction or is new controller overkill ?? ( i only use parallelport and bob right now.)

Also got a problem with changing in sound (like extra or missing clicks) from the motor, when i do as little as moving the mouse over the screen. I use a 2ghz desktop, os Win XP, and have disabled everything that does not needs to run. is the parallel setup this sensitive or am i having an extra issue here ?
 
Thanks in advance
Re: AC servomotor calibration problem
« Reply #1 on: September 01, 2017, 04:15:13 PM »
Hi,
welcome to the forum. You have a few questions there...I'm not sure I can answer any of them!...but can try.

What model servo are you using? Can you post a manual for it or a link to the manual? What model servo drive are you using? Do you have a manual
for it or a link to it?

You say that the servo 'accept 65000 pulses per rev', where did that info come from?

If as you seem to suggest the encoder produces 65000 pulses per rev, it seems an unusual number, I would have expected 65536, ie 2 to the power 16.
Either way the servo drive will expect 65000 pulses to turn one rev at full resolution. If you wanted the servo to turn that one rev in one second then Mach
would have to produce pulses at a rate of 65kHz. It seems unlikely in the extreme that a parallel port is going to produce any thing like enuf pulses.
One rev per second is only 60 rpm, to be useful for a lathe you probably want to spin 2000 rpm ie 33 revs per second.

With Mach open on the Config/Ports and Pins page immediately below the enabled ports boxes there is a box for Kernel speed, the lowest being 25kHz and
the highest is 100kHz. What is your machine set to? The Kernel speed is the repeat speed of the primary internal timer used by Machs pulse engine to generate
pulse streams. If the kernel is set to 25kHz, the norm, then the maximum rate pulse stream it can generate is 25kHz. This will be woefully inadequate for your
spindle. You might ask 'can I increase the kernel speed to be fast enuf for my servo' and the answer is no. Many PCs struggle to produce stable pulse streams
at all, the CPU has too many things going on to concentrate on producing an accurately timed pulse stream.
My wife left with my best friend...
     and I miss him!
Re: AC servomotor calibration problem
« Reply #2 on: September 01, 2017, 04:56:16 PM »
Hi,
sorry misclick...will carry on.
The faster you try to go the worse it gets. 25Khz is the common standard for most parallel port users. I have experimented with speeds up to 65kHz but
found it too unstable to be of any use and its not like my steppers need it anyway.

How can you solve this problem?

There are several alternatives:
1) Electronic gearing...just about all servo drives offer electronic gearing and in its simplest it means that if Mach applies one pulse to the drive
     it will get 'multiplied by 57', or whatever number you program into it... To take a extereme say you programmed in 65000 then one pulse from
     Mach would cause the servo to turn one rev. You could not however turn half a rev or some other fraction, ie electronic gearing costs you resolution,
     should that matter for a spindle?
2)Analogue voltage control....is there a reason that you selected step/direction, otherwise called position control for your spindle? If you intend to thread
   or require an indexing spindle for gearcutting maybe but in most cases just speed control is enuf. Just about all servo drives offer velocity control by
    application of an analogue voltage of 0-10V. Mach with a suitable breakout board can do this, most CNCers use analogue voltage to control the spindle
    speed.
3)Manual speed control...you could almost certainly have a pot or knob attached to you servodrive which controls the speed and then all Mach would
   have to do is turn it on or off.
4)Get an external motion controller...you mentioned an ESS, I use one and  it produces high quality pulse streams way WAY faster than a parallel port.
   I have a servo for my mill spindle, if I run it in step/direction mode (very unusally I might add) at full speed of 3500 rpm, ie 58 rev per second. The
  encoder is 2000 line or 8000 count per rev, ie at 58 rev/sec the ESS has to produce pulses at 467kHz without the use of electronic gearing. 467kHz is
   low AM band radio frequency! You need some flash signalling electronics to transmit pulses at that speed and your servo at the same speed will be
   58x65000=3.8Mhz. Within the ESS specs but only just and how you will signal your servo drive at that speed is a guess and could your servo drive even
   recognise a signal at that speed? The combination of electronic gearing and an ESS to bring the signalling rate down to a more reasonable 200kHz
   is indicated.

There  are some alternatives for you to think about....I would recommend you start by pursuing the simplest ones and later as your experience and/or
budget demands look at the  more ambitious (indexing) solutions. Analogue voltage and manual speed control are the simplest and ESS and/or electronic
gearing are the way to go for indexing operations.

Craig.
My wife left with my best friend...
     and I miss him!
Re: AC servomotor calibration problem
« Reply #3 on: September 01, 2017, 04:59:56 PM »
Hi,
sorry just rereading your post and yes all those sounds the servo is making are because Mach is not signalling the servo drive correctly, it probably
won't hurt the servo but its not how you want it to operate,

Craig
My wife left with my best friend...
     and I miss him!
Re: AC servomotor calibration problem
« Reply #4 on: September 01, 2017, 05:14:15 PM »
Hi and thanks for your answer joeaverage.

You are right about the encoder, i just couldn´t remember the excact number but you got it straight on.

The driver is a Bosch Rexroth DKC01.1-040-7-fw and the motor is a MKD090B-047-GG1-KN. The manual can be found at Bosch´s homepage, i have it but there is nothing about getting it to play within Mach3 or other like that.I have set the driver up with the software that belongs to this system so i am sure there is no errors there.

I think the only reason for the dro speed and actual speed is not the same must be because of the quality of the signal from the parallelport witch is changed to a differential signal with a driver called AM26ls31. I just ordered a smoothstepper today so i hope that will fix all of my problems at the same time.

I first set the step prr rpm to 200 cause this is what my steppers have too, but this made the motor really noisy and full of hard vibrations, and found out it gets better the higher i set the steprate. the 25 kHz is like you say not enough to get it running smooth cause the higher i set velocity=step pr rpm the lower the max speed gets, so smoothstepper and 4 MHz should fix that problem. Just hope the pulses is clean enough for my driver so the speed equals the actual speed. By the way is the only way to get an active "actual speed" by giving Mach3 a index signal from a proxy switch or similar. Again my mind tells me that in step mode what i ask for i s command should be precise what the actual speed becomes.

Whops saw you wrote more,,

I want to use step dir because then i can build a little bridge with a spindle so i can mill stuff like gears and put precise holes in a circular object, thinking i can use the spindle as a axis when i do this stuff. To begin with i also wanted this so i could do threading with total precision, cause mach3 would know precise were the spindle is all time and not only once pr rpm with in index way. Found out later that Mach3 was not even able to do threading this way, but still the axis need is there so fine with step mode. (maybe i have to give up upon it due to the vibration and noise but time will tell when smoothstepper is installed.

I am no electronic expert so sad to hear that i can´t even take advantage of the 4 MHz from ESS but i will look into what this electronic gearing is and were to get it/ how to build it.

I really appreciate that you take your time to help me out here. Thanks a lot.
Re: AC servomotor calibration problem
« Reply #5 on: September 01, 2017, 05:16:42 PM »
Hi,
sorry just rereading your post and yes all those sounds the servo is making are because Mach is not signalling the servo drive correctly, it probably
won't hurt the servo but its not how you want it to operate,

Craig
Yeah thats why i try out the smoothstepper now so i can get better and faster pulses
Re: AC servomotor calibration problem
« Reply #6 on: September 01, 2017, 05:18:38 PM »
Hi,
sorry misclick...will carry on.
The faster you try to go the worse it gets. 25Khz is the common standard for most parallel port users. I have experimented with speeds up to 65kHz but
found it too unstable to be of any use and its not like my steppers need it anyway.

How can you solve this problem?

There are several alternatives:
1) Electronic gearing...just about all servo drives offer electronic gearing and in its simplest it means that if Mach applies one pulse to the drive
     it will get 'multiplied by 57', or whatever number you program into it... To take a extereme say you programmed in 65000 then one pulse from
     Mach would cause the servo to turn one rev. You could not however turn half a rev or some other fraction, ie electronic gearing costs you resolution,
     should that matter for a spindle?
2)Analogue voltage control....is there a reason that you selected step/direction, otherwise called position control for your spindle? If you intend to thread
   or require an indexing spindle for gearcutting maybe but in most cases just speed control is enuf. Just about all servo drives offer velocity control by
    application of an analogue voltage of 0-10V. Mach with a suitable breakout board can do this, most CNCers use analogue voltage to control the spindle
    speed.
3)Manual speed control...you could almost certainly have a pot or knob attached to you servodrive which controls the speed and then all Mach would
   have to do is turn it on or off.
4)Get an external motion controller...you mentioned an ESS, I use one and  it produces high quality pulse streams way WAY faster than a parallel port.
   I have a servo for my mill spindle, if I run it in step/direction mode (very unusally I might add) at full speed of 3500 rpm, ie 58 rev per second. The
  encoder is 2000 line or 8000 count per rev, ie at 58 rev/sec the ESS has to produce pulses at 467kHz without the use of electronic gearing. 467kHz is
   low AM band radio frequency! You need some flash signalling electronics to transmit pulses at that speed and your servo at the same speed will be
   58x65000=3.8Mhz. Within the ESS specs but only just and how you will signal your servo drive at that speed is a guess and could your servo drive even
   recognise a signal at that speed? The combination of electronic gearing and an ESS to bring the signalling rate down to a more reasonable 200kHz
   is indicated.

There  are some alternatives for you to think about....I would recommend you start by pursuing the simplest ones and later as your experience and/or
budget demands look at the  more ambitious (indexing) solutions. Analogue voltage and manual speed control are the simplest and ESS and/or electronic
gearing are the way to go for indexing operations.

Craig.
sorry wrote my reply as reply to my own thread, thats how it is when one is a newbie to this kind of communication haha
Re: AC servomotor calibration problem
« Reply #7 on: September 01, 2017, 05:30:20 PM »
Hi,
sorry just rereading your post and yes all those sounds the servo is making are because Mach is not signalling the servo drive correctly, it probably
won't hurt the servo but its not how you want it to operate,

Craig
Yeah thats why i try out the smoothstepper now so i can get better and faster pulses
By the way, regarding the electronic gearing. Isen´t it what i already use when i via the software can choose step pr rev from a low number and up until those 65536 steps. Cant remember the precise number but if i what to set an ssi output from the driver i can go up around 1200 something, so maybe that is the number of the encoders output pr. rev
Re: AC servomotor calibration problem
« Reply #8 on: September 01, 2017, 06:42:53 PM »
Hi,
not quite sure yet but yes it would appear that you can program the resolution of the encoder...page 1.4
Quote
The number of steps per rotor revolution is adjustable between 16 and
65536.
If that the case then why choose max resolution of 65536? That equates to and angular resolution of 20 arc seconds! If your machine is rigid
and accurate enuf to demand a resolution of 20 arc minute let alone 20 arc second then you should be on a professional forum not a hobbyists one!
Additionally if you think you are going to successfully signal your drive at close to 4MHz your dreaming.

The solution I came up with for my servo driven spindle is:
Program the drive to operate in two different modes, the first, simple velocity mode using analogue voltage and, the second, with step/dir position
control.

Most of my milling ops can be done under plain velocity control, in fact its quite adequate to have just a knob you lean over and twist until the tool is
cutting as you want and the leave it there for the rest of the op...in some cases hours. This is the first of the control stratgegies and is selected by one
digital input (pin4 from memory) being held low by Mach. When I want position control for rigid tapping I go to the other mode by asserting the input
pin high. Typically when I'm tapping I don't tap at 3500 rpm! 100 rpm is fine and consequently the pulse output rate is 13kHz, in fact well within the
pulse rate of a parallel port let alone my ESS. As it turns out ESS can signal 467kHz no probs and my drive can receive 500kHz with differential signalling
but transmitting signals of that frequency can be fun and ultimately not even really useful or required for mill operations.

I haven't read the Bosch manual enuf to know whether it allows this dual mode strategy, my Allen Bradley drive does and I've seen it offered in other
makes as well and guess it is therefore standard fare for modern drives. If it is it would allow you to get simple speed control running and then put
your thinking cap on for the indexing mode. I doubt you will need anything like the max speed of the spindle when indexing and so when you 'gear it
down' (electronically speaking) you don't have to sacrifice resolution hugely and yet still end up with a pulse rate that means you don't have to be an
RF/ High Speed Digital engineer to get it to work.

Craig
My wife left with my best friend...
     and I miss him!
Re: AC servomotor calibration problem
« Reply #9 on: September 01, 2017, 07:23:53 PM »
Since i haven´t tried anything in mach3 turn yet, i have to ask.

The ultimate way of cutting on a lathe is to keep the same feed and that means that the speed of the motor have to change all after the diameter of the material your working on, so my question is this, can mach3 control and adjust speed on the spindlemotor in velocity mode, when you attach a potmeter to regulate the speed manually. I am not sure but i think i can only use a potmeter as an override feature in jogmode.

I haven´t read to much about velocity mode in my manual or mach3´s manual, so i have no clue on how to change direction. I only noticed a jog + and - on the driver. Guess i need to study some more and try to see if there is a solution like yours if i can´t get rid of the noise.

You mentioned your milling when talking about your setup. Mine is for a lathe spindle, sorry if i forget to mention that earlier.


Again i bow in respect to you for spending your time on me,, thanks a LOT.


My driver can not do like yours with setting up two different setups, i have to connect to the driver with a old old laptop running win 3.1 or xp (thats how old this software is) and then via software set the driver to work in either analog, velocity, torque or step mode.

The reason for setting the pulsrate this high is to eliminate the noise and vibrations, not for accuracy