Hello Guest it is December 30, 2024, 12:39:25 PM

Author Topic: Still being driven mad by arcs  (Read 12187 times)

0 Members and 1 Guest are viewing this topic.

Still being driven mad by arcs
« on: October 09, 2010, 09:54:30 AM »
My problem is that my lathe loses position when I use any code with either a G2 or G3 command. I think that there is something in the pulse train in curves that confuses the servo drive. I have tried the following tests. I have written a test program that runs an S shape (G2 then G3) 50 times in rapid. At the end there is an error on each axis +0.8mm Z and -1mm X. I can run a test on either axis running 200 rapid moves backwards and forwards  - no error. I can run 200 moves backwards and forwards with both axis moving together in a straight line - again no error.

The errors are repeatable. I do not think that it is noise, a weak port signal, or my rather old pc (although I could be wrong).

The servo drive needs the Dir pulse to lead the Step pulse. My problem is that I do not know what that means! I have step set in Mach3 at 3 and Dir as 10. I have tried loads of values but seen no change.

Is the Dir signal pulsed in the same way as the step or does it only change between 0 and 1 on a direction change?

As far as I can measure (which is good enough for me) I have no problems with any moves other than curves. I have been working at this for 2 months now and may just burn down the shed!

I have servos 2000 line encoders, 16x multiplier, 200/250 steps per mm and a dual axis servo drive.

Offline Tweakie.CNC

*
  • *
  •  9,280 9,280
  • Super Kitty
Re: Still being driven mad by arcs
« Reply #1 on: October 10, 2010, 05:46:34 AM »
I can answer a couple of your questions but not all, sorry.

Quote
The servo drive needs the Dir pulse to lead the Step pulse. My problem is that I do not know what that means! I have step set in Mach3 at 3 and Dir as 10. I have tried loads of values but seen no change.

This means that the direction signal has to be established before the step signal is sent and Mach automatically does this.

Quote
Is the Dir signal pulsed in the same way as the step or does it only change between 0 and 1 on a direction change?

The direction signal is either low or high (0 or 1) and remains at its last setting until a direction change, for that axis, occurs.

Tweakie.
PEACE

Offline RICH

*
  • *
  •  7,427 7,427
Re: Still being driven mad by arcs
« Reply #2 on: October 10, 2010, 06:54:08 AM »
Can you post your test file for the s curve?
RICH
Re: Still being driven mad by arcs
« Reply #3 on: October 10, 2010, 03:02:20 PM »
Thanks all,

the code in the subroutine is

G90
G2 X0 Z-24 I0 K-12
G3 X0 Z-24 I0 K-12
G0 Z48

repeated 50 times. The problem is not unique to the code but to any program with G2 or G3 moves but strangely not to any code written with straight lines including where the axis move together. I had another play today and tried to run a G76 threading cycle - not a chance! the drive signaled an E-stop saying that there was a follower error. I wonder if there is a link? I think the servos are well tuned but am not sure.

I am getting a bit grumpy with my CNC lathe a I made some parts on my 1908 lathe as therapy!

Offline RICH

*
  • *
  •  7,427 7,427
Re: Still being driven mad by arcs
« Reply #4 on: October 11, 2010, 05:58:57 AM »
What happens with the following since the G3 is just the reverse of the  G2?
try in CV and also exact stop. If you put a pause in between the arcs you may be able to check the positions
before the G3 code is implemented....

G90
G2 X0 Z-24 I0 K-12
(G4 P?  to check position )
G3 X0 Z0 I0 K-12 ( maybe add another g4 after the g3)
G48

Quote
the drive signaled an E-stop saying that there was a follower error
Did you allow say 3 to 5 diameters of Z movement before the start of threading?

RICH
« Last Edit: October 11, 2010, 06:01:15 AM by RICH »
Re: Still being driven mad by arcs
« Reply #5 on: October 11, 2010, 06:53:07 AM »
Thanks for the help - I will try that this evening. I am however beginning to think that my servo tuning is off. At low speeds the motors click and the errors are much worse. The faster I run the machine the less the errors - almost the reverse of the usual difficulties I have seen posted.

As for the threading - you are right I did not allow anything like enough Z before cutting - I will try again.


Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
Re: Still being driven mad by arcs
« Reply #6 on: October 11, 2010, 07:02:38 AM »
What type servos/drives do you have? Whats your accel?
Hood
Re: Still being driven mad by arcs
« Reply #7 on: October 11, 2010, 07:19:20 AM »
Hi

Servos are brushed DC SEM servos Max 140v (running at 100v) Encoders are 2000 line differential - The drive is a Granite Devices Dual drive. I have varies the accel from 50mm/s/s up to 400mm/s/s it is most comfortable at between 150 and 200 - changing the accel  has no noticable effect on the error - however changing the velocity does - slower is worse.

I have set the multiplier on the drives to 16x. Since doing that I notice that the servos click at very low speeds - sounds like the brushes on the armature but I am not sure - motors are fairly new (the machine had sat all its life unused in a college)

Any thoughts at all gratefully received. I tuned the motors quite carefully and got good response curves - I am starting to wonder whether there was a backlash or stiction issue.

I have shielded all cables and do not think noise is the issue - the errors are repeatable - same size same direction. I have reloaded the pc and changed the parallel port cable - no change at all. As I say all non curve moves appear to be accurate (I have tested that statement reasonably carefully).

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
Re: Still being driven mad by arcs
« Reply #8 on: October 11, 2010, 07:45:35 AM »
Afraid I am not a fan of electronic gearing even on the industrial AC  drives I use, some people say its great but afraid I dont. Is there any way you can set it 1:1 and see if that helps, problem there I suppose would be you would effectively have to reduce the Velocity due to the pulses required (presuming you use the parallel port) and that will likely reduce the problem anyway.
What kernel are you running and have you tried it faster, if possible, so you can reduce the electronic gearing?
Hood
Re: Still being driven mad by arcs
« Reply #9 on: October 11, 2010, 07:56:25 AM »
I can set the gearing to 1:1. I have not tried that. I started at 4x and moved upwards - no obvious change to the error. I am using 25kHz. My PC is only 1.1GHz with 256MB of Ram - it may not like running any faster. at 1:1 I would be up to 3200 steps per mm great resolution but maxed out at about 240mm/min! New PC?