Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: Dan13 on April 14, 2015, 03:10:44 AM

Title: AC Servo Spindle and ESS
Post by: Dan13 on April 14, 2015, 03:10:44 AM
Hi,

Have fitted an AC servo to a large spindle (380mm chuck). It uses an ESS as a controller. Trouble is, when spindle runs, hitting the Stop in Mach causes an abrupt stop of the pulse train to the servo drive and it instantaneously stops. With a chuck that big, it means tearing the belt and causing other damage. With the USB SS it has never been an issue (have it on two machines) and hitting Stop still smoothly decelerates to a stop.

Hood, I am sure you encountered this on your Computurn with the large chuck prior to switching to CSMIO. How did you solve this?

Thanks,
Dan
Title: Re: AC Servo Spindle and ESS
Post by: Hood on April 14, 2015, 03:52:49 AM
Still have the ESS on the big Lathe Dan, would love to have the IP-A on it but that will not happen until threading with it can pull out instantly.

Ok the ESS has issues with the spindle and that is one of them, press feedhold and axes stop then press Stop and as you say spindle just suddenly stops with no deceleration and on lathes with big chucks that is not nice. The SS used to do it as well but Greg fixed that but for some reason it was introduced back with the ESS and  it was never fixed.
 I have got into the habit of pressing my spindle off  button before I press Stop, occasionally I still forget though and it is not nice :(

Hopefully you may have more luck getting Greg to fix it than I did.

Hood
Title: Re: AC Servo Spindle and ESS
Post by: Dan13 on April 14, 2015, 04:31:01 AM
Oh... thought that threading issue with the CSMIO had been resolved.

Mentioned it to Greg a few times in the past, but as I recall he didn't know how it was different from the SS. He said he was pursuing the original Mach's behaviour and thought this was the normal behaviour it. On the small lathe I too have the habit of turning the spindle off prior to Stop, but sometimes I forget which is not a big deal - it's not nice as you say. However, with this machine, it is much more than being merely not nice with a chuck weighing more that 70kg.

As a workaround I could probably send a signal from Mach upon a Stop (or Reset) hit, to the Servo Emergency Stop input. Somehow, hoped you might had a more elegant solution for this after years of use ;)

Anyway, will talk to Greg again, and unless he can fix it real soon, will have to switch to CSMIO.

Have you switched to Mach4 on any of your machines, by the way?

Thanks,
Dan
Title: Re: AC Servo Spindle and ESS
Post by: Hood on April 14, 2015, 04:54:14 AM
I gave up on hoping Greg would solve the spindle issues with Step/Dir spindles :(

Threading in CSMIO works great with the exception of the delay at the end of each pass, that may not be an issue for some but for most of the threads I do an annular groove is not acceptable.

No don't have Mach4 on any machines, had been trying it on the wee lathe but the CSMIO plugin and for that matter Mach4 on a lathe is not great, waiting on an updated plugin but that seems to be taking a while.

I do not feel Mach4 is good enough yet to risk testing on the Chiron or the big lathe and the Beaver Mill has a USB SS on it and as far as I am aware it is only the ESS that has a Mach4 plugin.

Hood
Title: Re: AC Servo Spindle and ESS
Post by: Dan13 on April 14, 2015, 06:53:13 AM
Thanks Hood.

Dan
Title: Re: AC Servo Spindle and ESS
Post by: Jeff_Birt on April 14, 2015, 08:18:09 AM
In Mach 3 when you hit 'Stop' the output immediately stops, you get no deceleration. I'm not saying that is desirable but that is how it works. If you hot 'Feed Hold' you get a nice deceleration to a stop. Always use 'Feed Hold' and once the machine has halted then hit 'Stop'.
Title: Re: AC Servo Spindle and ESS
Post by: Overloaded on April 14, 2015, 08:48:27 AM
Have fitted an AC servo to a large spindle (380mm chuck). 
Dan

Hello Dan,
 Just curious ... what is the brand and kw rating of this motor/drive combination ?
Are you using an external braking resistor or shunt ?
I would think that the drive would trip from the back feed before it would strip the belts.
Must be a real power house.
 
Thanks Dan,
Russ
 :)
Title: Re: AC Servo Spindle and ESS
Post by: Dan13 on April 14, 2015, 10:09:39 AM
Jeff, it is the possibility of mechanical damage to the machine by hitting a wrong button in Mach which frightens me. I want my machine to be fool proof. Also, I still keep getting the "SmoothStepper ran out of data" message every now and then, and I am not sure about this, but I think it would also cause that sudden stop. Again, not sure about this one as I've just fitted the large chuck and with small one it really never made a difference how it stopped so don't recall.

Russ, it is a 2kW Delta servo. Don't have an external resistor. It has a 6:1 reduction transmission to the spindle, so the motor doesn't experience the full inertia of the load. Still easily tears an HTD-5M 15mm wide belt not even tripping an error.

Dan
Title: Re: AC Servo Spindle and ESS
Post by: Jeff_Birt on April 14, 2015, 10:29:29 AM
Make sure you are using the latest ESS plug-in and a Mach version higher than 3.043.058. There was an issue with how previous versions of Mach filled the motion buffer that could cause the 'ran out of data' problem.

If you want to avoid the possibility of a user hitting Stop and causing a problem then write your own macro for the Stop button, it could do a feed hold and wait till the machine stopped moving and then issue the stop. You will have a similar problem though if the user hits EStop so you might need a brake on the spindle to stop if safely in an emergency.
Title: Re: AC Servo Spindle and ESS
Post by: ger21 on April 14, 2015, 10:52:39 AM
Correct me if I'm wrong, but feedhold does not stop the spindle, so it won't help him.
Title: Re: AC Servo Spindle and ESS
Post by: Jeff_Birt on April 14, 2015, 11:03:42 AM
True, I did not think of that. Then the custom start button would need to fed hold and turn off the spindle. Still you will have the same undesirable action with EStop so a electromagnetic brake may be the only way to go.
Title: Re: AC Servo Spindle and ESS
Post by: Overloaded on April 14, 2015, 12:31:27 PM
Thanks Dan.

You might also utilize/incorporate the drives enable input to any macro or button script you might make up.
An instant disable would allow the servo to coast to a stop on some drives .... if not all most likely. Yours may however be different.

The E-Stop should of course stop instantly.

Russ
Title: Re: AC Servo Spindle and ESS
Post by: Dan13 on April 14, 2015, 03:23:53 PM
Using the latest ESS plugin with 062 Mach version.

I don't have a problem with the Estop as it sends a command directly to the Serrvo emegency stop input. The servo then coasts to a stop. Like I said, I can send a signal over modbus to the servo emergency input on a Stop hit. Wonder if Mach allows to trigger a signal on a reset hit as well.

Dan
Title: Re: AC Servo Spindle and ESS
Post by: Jeff_Birt on April 14, 2015, 04:20:50 PM
Quote
I don't have a problem with the Estop as it sends a command directly to the Servo emergency stop input

That describes an enable line not an EStop. An EStop generally removes power immediately from all things that move. That means when you hit the EStop button the mains to the servo power supply should be cut. If you are relying on a logic input to the servo drive what do you do when the servo encoder dies and the servo runs away?

There are some types of machine that will let servo controlled axis coast for a few seconds in order to safely decelerate them and then cut power. Different regulating bodies will have different codes that cover this sort of thing.
Title: Re: AC Servo Spindle and ESS
Post by: garyhlucas on April 14, 2015, 07:34:26 PM
That is why he needs the macro, to issue the feedhold then the stop after the speed is down low enough.
Title: Re: AC Servo Spindle and ESS
Post by: BR549 on April 14, 2015, 09:15:43 PM
Stop should do no harm to machine or OP. I do not know of ANY commercial controllers that do not deaccellerate the spindle and axis's on STOP.  If it is an emergency STOP then Estop is the proper proceedure and that is stop at all cost even using the crowbar method .

STOP is NOT an Estop.

Just a thought, (;-) TP
Title: Re: AC Servo Spindle and ESS
Post by: Dan13 on April 15, 2015, 02:37:14 AM
Jeff, I neglected to mention that hitting the Estop also cuts power to all drives.

Dan
Title: Re: AC Servo Spindle and ESS
Post by: Hood on April 15, 2015, 06:50:07 AM
It all boils down to the fact there is an issue with the ESS and the spindle, not sure if it is solely Step/Dir spindles or whether it is all control means.

The ESS should not suddenly take away the pulses from the spindle when you press Stop, the USB SS does not do that (although it used to) and any other controller I have used does not.

As said earlier I have now got into the habit of first pressing the Spindle Off button, after the feedhold and before I press Stop, but I do occasionally forget and it is not pretty with a heavy chuck.

Hood
Title: Re: AC Servo Spindle and ESS
Post by: Jeff_Birt on April 15, 2015, 07:27:59 AM
Hood, the default behavior for Mach 3 is to stop all pulses when Stop is pressed. The ESS is simply doing what the parallel port driver has always done, not that it is a good thing to do. Think about it this way, what path should an axis decelerate in? The ESS has no idea, only Mach 3 knows the path that was programmed via GCode. The only thing the ESS could do is decelerate each axis in a straight line.
Title: Re: AC Servo Spindle and ESS
Post by: Dan13 on April 15, 2015, 07:31:17 AM
Right Hood. And as Terry said hitting a stop on a machine should not harm it. There is a problem with the ESS and everything else are just workarounds.

Dan
Title: Re: AC Servo Spindle and ESS
Post by: Hood on April 15, 2015, 07:32:45 AM
Jeff, you seem to be misunderstanding, I am talking Spindle, not axes.
If I press feedhold the axes decelerate to a stop, the spindle keeps turning. If I then press Stop the spindle will, with the ESS, have its pulses withdrawn immediately and thus will come to a sudden stop.
The USB SS does it correctly by decelerating the spindle at the rate of acceleration set in Motor Tuning, the ESS should do the same.

Hood
Title: Re: AC Servo Spindle and ESS
Post by: Hood on April 15, 2015, 07:48:06 AM
Dan, also I am sure you are aware as this happens with the USB version as well as the ESS, but just in case you are not. Make sure you edit your M3 and M4 macros so that they check whether the spindle is running before doing the reversal, if it is have the macro stop the spindle first or you will probably get the same effect as you are experiencing with the Stop issue.

I am not sure how the parallel port handles things as it has been a long time since I have used it but the CSMIO/IP-A and -S will first decelerate before reversing, however as I am unsure how the parallel port handles things I can't say whether this is a ESS/USB SS fault or just emulating the parallel ports actions.

Previously I had edited my CAM to do a M5 before a reversal but I feel it is actually safer to do it via the M3/M macros.

Hood
Title: Re: AC Servo Spindle and ESS
Post by: Dan13 on April 15, 2015, 09:44:23 AM
Yes, I am aware of this Hood. In the kind of work I do, I rarely reverse the spindle just like that. So usually there will be an M5. But it does happen seldom. It's a good idea to have a  macrto take care of this. Thanks.

Dan
Title: Re: AC Servo Spindle and ESS
Post by: Jeff_Birt on April 15, 2015, 11:55:54 AM
Hood, a S/D spindle is treated just like an axis in that Mach 3 generates a pulse train just as for the other axis. When you press the 'Stop' button Mach 3 (parallel port driver) will immediately stop outputting pulses, in other words instant deceleration. I don't think this is desirable but it is how it works and with stepper motors you are sure to loose position if the machine is moving.

The SmoothStepper tries to emulate the parallel port driver so it to immediately stops outputting pulses. Using Feedhold is the only way to decelerate to a stop, then press the Spindle button to turn off the spindle safely, then you can hit Stop. The issue I was talking about before is that if the SmoothStepper tries to decelerate the axis (including S/D spindle) on its own, it has no idea of the correct path the machine should be following so the best it will be able to do is decelerate in a straight line (whereas Feedhold will stay on the correct path.)

Mach 4 is so much quicker at talking to the plug-ins that I think we'll see a lot better behavior in this type of scenario and we can make the Stop button to a feed hold, which will work properly with external devices, and then to a spindle off and then a Stop.
Title: Re: AC Servo Spindle and ESS
Post by: Hood on April 15, 2015, 12:08:18 PM
Jeff,
 I can not recall how the parallel port works in respect to the spindle. I saw Ger saying pressing feedhold does not halt the spindle, so that is the same as the ESS. However I do not know if subsequent press of Stop suddenly halts the spindle without deceleration or not and I have no way of testing with the PP to see.
There is however one pertinent fact, the USB SS handles things as you would expect so it would be reasonable to presume the ESS should do it that way as well.

Greg said he would look into it many times but either he could not find the problem or just was too busy to get round to fixing it and I gave up mentioning it.
I still like the ESS but it does have problems with Step/Dir spindle and this is just one of them, they are not massive problems but can be alarming at times.

Hood
Title: Re: AC Servo Spindle and ESS
Post by: Jeff_Birt on April 15, 2015, 12:19:39 PM
What problems with the S/D spindle are you referring to? I have several customers who use S/D to Analog cards to control their spindle speed and that seems to work fine.
Title: Re: AC Servo Spindle and ESS
Post by: Jeff_Birt on April 15, 2015, 02:23:24 PM
I was chatting with Greg about this. The issue is that in Mach 3 that a Step/Direction spindle is sent to external devices as a jog command, when you hit 'Stop' Mach cancels the jog processor so all the sudden you have no S/D output to the spindle servo controller. The axis are also cut off suddenly.

What I might think of doing is customize the screen set with my own stop button. The stop button would do a feed hold, when the axis stop then do an M5, when the spindle stop then do a 'Stop'.
Title: Re: AC Servo Spindle and ESS
Post by: Dan13 on April 15, 2015, 02:32:49 PM
With the USB SS, Greg somehow made it work properly. A custom screen is a possible workaround (pressing the reset button would still result in the same), but a fundamental solution would be solving it at the controller - at no occasion it should allow for a sudden stop of the pulse train stop to the spindle. Even when it recognizes a sharp interrupt in the pulse train, it should take over and safely decelerate, regardless of Mach3 state.

Dan
Title: Re: AC Servo Spindle and ESS
Post by: Hood on April 15, 2015, 03:19:36 PM
What problems with the S/D spindle are you referring to? I have several customers who use S/D to Analog cards to control their spindle speed and that seems to work fine.

The ones that come to mind are
Very occasionally the pulstream will stop for a split second, this also happens with the USB SS but as I have that on a mill it is hardly noticable. On the lathe however with the heavy chuck it is more noticable as you get a clunk from the backgear. As said however this is very occasional and can be fine for long periods. I only ever once managed to capture it on a scope and that was just pure luck that I was walking past at the time as it had been connected up for days without an issue.

The spindle override is poor, if you override the spindle it will be consistent for a short period of time then it will get very erratic, again this is amplified due to the weight of the chuck. I have my spindle override disabled due to this. At the start I wondered if it was the external pot that was the issue or possibly  noise  but I can watch the PLC and also the Brain and the numbers in it are very steady and the values in the PLC are big so any variance is easily seen.

The pulses themselves from the spindle output is not like the axes in that the width is not controlled with the velocity but rather it is fixed. This causes issues if you try to use a high steps per unit as the pulses are just too close together at higher RPMs. My servo drive can really respond to a high rate of feedback but I can not take advantage of it due to the way the spindle pulses are output. If I uses a high interpolation on the feedback encoder then I get nice control but I then have to use a large electronic gearing for the steps per unit input, this then can cause problems if stopping from higher RPMs. To confirm that it was definitely an issue with the way the spindle pulses were output I configured the spindle as an axis and the problem dissapeared.




Hood
Title: Re: AC Servo Spindle and ESS
Post by: simpson36 on April 22, 2015, 09:03:41 AM
Coincidentally, I have been messing with screens lately and it occurs to me that this issue might be easily fixed by replacing the action behind the stop button.

Both my mill spindle and 4th axis have enable/disable states and pneumatic locks, so I have long ago replaced the spindle ON/Off with macros which check the condition of the lock and enable state prior to starting the spindle and check the speed of the spindle prior to engaging the lock and so on. Both spindles are AC servos, but the drives themselves take care of deceleration in the event of a sudden pulse stream loss, so that was never an issue that I needed to resolve.

I jumped into the Mach3 screen editor to confirm that the red 'stop' button can indeed be changed to trigger a VB script. (see attached image)

From there it should be an easy task to program any sequence you want including checking the spindle speed and decelerating it to zero prior to MACH abruptly shutting off the pulse stream. I am unsure if the 'ismoving' function in MACH works with the spindle, but in case it did not, I recall Hood saying that there is a 'speed reached' signal available from the drive.  I use this signal to prevent Mach from moving the axis prior to the 4th axis reaching speed (for turning) and it works fine.

There are probably a lot of ways to skin this cat, but off hand, I don't see why commanding zero speed and then monitoring a 'speed reached' signal from the drive prior to issuing a 'stop' would not be a complete solution. There may be a way to stop the axis movement while waiting for the spindle to decelerate, but I would need to noodle on that for a while.

Title: Re: AC Servo Spindle and ESS
Post by: Dan13 on April 22, 2015, 11:55:45 AM
Hi Steve,

How did you programm the drives to decelerate in case of a pulse train suddenly stopping? As I recall you were using Mitsubishi drives and as far as I know the Delta drives I am using are a Taiwanese copy of the Mitsubishi.

Editing the buttons is an option, but it's still done in software, while I would prefer doing this at the controller level or the drive itself. There still is the Reset button in Mach3 that would cause the same, and also if the ESS runs out of data (which happens to me every ones in a while), so this is something for the controller to take care of, that is if I want to make it as safe as possible.

Dan