Hello Guest it is March 23, 2023, 06:35:00 AM

Author Topic: Z Axis Drift With Servos...I Don't Understand It  (Read 783 times)

0 Members and 1 Guest are viewing this topic.

Z Axis Drift With Servos...I Don't Understand It
« on: January 04, 2021, 06:04:29 PM »
Hello there Mach world! Long time listener, first time caller here.

I've got a problem on my hands that I can't seem to sort out on my own. I've tried to read through all the posts in all the different amateur support groups that I can, but I now I think I need some help from the pros. I'll try to explain all of this in as best of detail as possible.

Basically what's happening is this:

When I run a G-Code in Mach3 that requires a lot of up and down movement in the Z and a fair amount of travel in the X or Y...I have noticed that by the time my program is through, and my spindle and bit return to my Zero position, the Z axis has drifted upwards a small amount to a new location. But the DRO still reads that it is in the correct position (X0, Y0, Z0). And this happens even when the machine is running in the air and there is no material being cut.

The distance that is lost in the positive Z direction seems to have a direct correlation with how much movement takes place in the Z axis.

For example:

If I run a 3D Finish raster carving with a .125" ball nose with a stepover of 10% - the Z axis will lose it's position by say +.5" (arbitrary number).
And if I run the exact same carving with the exact same bit with a stepover instead of 5% - the Z axis will lose it's position by double the amount and wind up 1" higher than my original Zero position.

This proves to be true for any program, any bit, any raster direction, feed or speed, any time of day, etc... I have even tried swapping the Z motors with one from X or Y and the problem still persists.

I have tried greasing and lubing everything, tightening everything that I have access to, and changing the acceleration, the feed rates, and the Step/Dir Pulse values from 0 - 8.

I was doing some reading through other posts here and it seems this gentlemen was having the same issue as I am:
but he has a different controller than I do and I can't seem to find any information regarding a multiplier board on a PMDX-126 or a SmoothStepper. Admittedly, I do not know what a multiplier board is, so that doesn't help my cause much.

Here's a little info on what I'm running:
5' x 10' Precix (Chinese) CNC
Rack and Pinion
Ball Screw Z
PMDX-126 with a SmoothStepper
Delta Drivers and Servo Motors
Mach3 on Windows 7

And my G-Code is being created by the "Mach2/3 Arcs (inch) (*.txt)" post processor in Vectric Aspire on a separate MSI computer running Windows 10

I'm going to attach a compressed copy of a G-Code test program that I'm running today. It seems to give me a repeatable loss in Z of about 3/16".

I hope this all does a good job of explaining my issue clearly. If there is anything at all that any of you guys might suggest for troubleshooting I would greatly appreciate it.

Thank you all in advance!
Re: Z Axis Drift With Servos...I Don't Understand It
« Reply #1 on: January 05, 2021, 03:11:07 PM »
Im wondering if the signalling to the servo drives is 100%

What model servos and what model drives? Are you using differential signalling or single ended?

One suspicion I have is that if for instance you signal the Z servo to go upwards by 200 steps, it goes up 200 steps, but when you
signal it to go down it will go down 199 steps. Over a period of time that will result in the Z axis being higher than it should and furthermore will
grow as time passes.

This fault can occur with stepper or servos if the signalling is not quite right, commonly the drive is expecting active low step signalling when
your BoB is using active high. It means that one step is missed at each Z axis direction change.

My wife left with my best friend...
     and I miss him!
Re: Z Axis Drift With Servos...I Don't Understand It
« Reply #2 on: January 05, 2021, 04:14:21 PM »
I had someone else mention the signal as well, but they were saying that I would need an oscilloscope to properly troubleshoot it. I wonder if there is a way to measure a fault there without one?

I did attempt to change the active low to active high in Mach at the Motor Outputs tab. That resulted in the axis control basically being reversed, so in order to test it I also had to the Reverse axis tabs in Homing And Limits menu. And after running my test code like that, I still wound up with the same amount of loss in Z. I wonder if I changed the Active Low/High from the BoB if that would make a difference? I'm going to give that a shot today.

My drivers are Delta ASD-A0721-AB
And my Z motor is ECMA-C30807FS

Thanks for your help man, very much appreciated
Re: Z Axis Drift With Servos...I Don't Understand It
« Reply #3 on: January 05, 2021, 07:24:40 PM »
the Active high/ Active low switch if applied to the Dir signal will change servo direction, but you don't need to do that. You can leave the Dir signal alone.

All you have to do is change the Step signal, if I recall correctly Delta call that 'Pulse'.

Are you using single ended (open collector) or differential?
If single ended, how are your signal inputs wired, ie do they require current source or sink?

The fault I'm imagining really only happens with single ended signaling. I'll try and explain what I think may be happening. Lets say BoB has a pull-up resitor fitted.
Thus when a move completes and the Step signal is idle it will go high. Lets imagine also that the servo drive accepts a pulse on a negative transition. When a pulse
stream of 200 pulse comes along there are 201 negative transitions but only 200 positive transitions, and thats why you get drifting.
If your BoB had a pull-down resistor instead the there would be 200 negative transitions and 200 positive transitions. An oscilloscope would be the best way to
diagnose that.

I am in the middle of a new build and am at the moment wiring the B2 series Delta servos. With the resolution I want, 5000 pluse/rev, I require
signal speeds of 417kHz and so perforce am using differential signalling, and I have made my own line drivers for it.

I had experimented with single ended signalling but the drive started playing up beyond 225kHz. Given that the spec for  max single ended signalling is 200kHz,
I can't complain, but I wanted a bit more, ergo differential signalling.

My wife left with my best friend...
     and I miss him!
Re: Z Axis Drift With Servos...I Don't Understand It
« Reply #4 on: January 05, 2021, 08:54:30 PM »
Ah I gotcha! You were absolutely right, I change the Dir instead of Step. So I changed that one and I'm now running another test run of the code.
Just to be clear, are you referring to the Active High/Low settings in mach3 or is it possible to change them in the driver parameters?

For the single vs differential...
I actually had to go and read up on that and I understand the concept now, but I'm not 100% sure if I can tell you what my motors are. I can tell you that each motor has 4 wires running to it - Red, White, Black, and a Ground. Is there a specific way to tell? I'll attach a partial picture of the wiring diagram to the motor.

I understand what you're saying on the pull-up/pull-down resistors. I just don't know what they look like/how I would know what my board is using. I'll have to look into that.
This is the manual for the board though:https://www.pmdx.com/Doc/PMDX-126_Manual_19.pdf
Would it be in there?

Definitely need to order an oscilloscope and learn how to use it
Re: Z Axis Drift With Servos...I Don't Understand It
« Reply #5 on: January 05, 2021, 08:58:05 PM »
Oops, forgot the photo
Re: Z Axis Drift With Servos...I Don't Understand It
« Reply #6 on: January 06, 2021, 12:55:59 AM »
my knowledge is limited to the B2 series being a bit later than the AB series, however I think you'll find you can use either
differential OR single ended, the difference is largely how the IO plug is wired, you'd use terminals p & q say for differential whereas you'd use
terminal r for single ended (open collector) input and  the COM terminal which would be common to all inputs.

Can you take the shells off the IO connector and identify which terminals have been used?. The manual would then tell you whether the IO
plug has been wired for single ended or differential.

Single ended input of Delta servos is 24V, like most industrial servo drive designs. Differential is 5V, application of more than 5V between the diferential inputs
risk blowing the photodiode.

I'm not sure the wiring diagram you've posted is relevant, there are several different ways to wire the pulse inputs, and the diagram likely shows
just some generic or common method of wiring, not necessarily how yours is wired.

According to the PMDX manual the outputs are 5V TTL. You would need a level translating transistor or MOSFET to use single ended signaling
to your drives. It may be that is your fault right there, you have a BoB with 5V outputs driving 24V inputs.

My wife left with my best friend...
     and I miss him!
Re: Z Axis Drift With Servos...I Don't Understand It
« Reply #7 on: January 06, 2021, 09:21:18 AM »
I would suggest splitting physical check from electrical position
Put Dia Test indicator on bed of mahine and program to it for minus direction is it repeating ?
Do the same now for Z plus direction ?
Then move to x home and check there and also at minus direction -----What this does is making sure the Z axis is physically repeating and moving on the other axis that the whole column in/gantry is not coming loose of linear ways
Re: Z Axis Drift With Servos...I Don't Understand It
« Reply #8 on: January 07, 2021, 04:50:21 PM »
Good news! Changing the Active Low to Active High for the Step pulse totally fixed it! I'm super happy, as this machine has never been in better shape than it is now.

I really appreciate all of your help in getting me there