Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: Scott Kelley on May 02, 2011, 02:08:45 PM

Title: Axis' accumulating error - need to emulate Mach3 output for testing
Post by: Scott Kelley on May 02, 2011, 02:08:45 PM
A lengthy description and discussion of this issue is posted here: http://www.cnczone.com/forums/servo_motors_drives/127477-axis_dont_return_zero_-.html#post935541

Basically, the axis' slowly gain counts and creep in the positive direction.  At this point, the remaining possible culprits seem to be the servo drive itself, and Mach3.

I would like to rule out Mach3 by simulating its output.  Is there something available that will provide the pulse train output for the charge pump, and the ability to exercise one axis?

Thx
Scott Kelley
Title: Re: Axis' accumulating error - need to emulate Mach3 output for testing
Post by: Hood on May 02, 2011, 02:50:09 PM
Have you tried changing the active state for the step pulse, I seem to recall hearing some others have this issue when the active state was set wrong for their drives.
Hood
Title: Re: Axis' accumulating error - need to emulate Mach3 output for testing
Post by: Scott Kelley on May 02, 2011, 03:18:59 PM
I have tried changing the active state.  As I recall, it seemed to make no difference.  But I did not do so while running the test that I described.  I will do that this evening in order to determine exactly what the effect is.
Title: Re: Axis' accumulating error - need to emulate Mach3 output for testing
Post by: Hood on May 02, 2011, 03:40:52 PM
Ok well afraid I have never used any CNC4PC BOBs but if your drive has opto isolation and the BOB also has it on the step/dir outputs it may be  the issue.
Noise on Step/Dir could also be a cause as well.
Hood
Title: Re: Axis' accumulating error - need to emulate Mach3 output for testing
Post by: Scott Kelley on May 02, 2011, 04:19:14 PM
if your drive has opto isolation and the BOB also has it on the step/dir outputs it may be  the issue.
Hood

Yes, the BOB does have opto-isolation on the step & direction lines, and the servo driver also has opto-isolated inputs.  What is your concern re. this?
Title: Re: Axis' accumulating error - need to emulate Mach3 output for testing
Post by: Hood on May 02, 2011, 05:26:19 PM
I have seen it mentioned several times that double opto-isolation can cause issues and definitely recall some saying that when they connected direct to the port to test their issue was solved. I am not an electronics guy so I can only go with what I see people saying works for them.

Hood
Title: Re: Axis' accumulating error - need to emulate Mach3 output for testing
Post by: HimyKabibble on May 02, 2011, 11:50:37 PM
I would be very suspicious of the BOB. The design of the opto circuits on that board leave a lot to be desired, especially for servo systems that require much higher step rates than steppers.  I had several C11s, and they all topped out at a very low step frequency, and  badly distorted the signal.  I was able to re-bias the optos and get them to run over 125kHz, but out of the box they completely stopped passing the step pulses at something well under 30kHz, due to improper opto biasing, and a strange pulse-shaping circuit they use.  If you slow down your max speeds, and the problem goes away, that would be a good indication this could be the problem.  If you can prove the BOB is at fault, I suspect you could get Arturo at CNC4PC to swap it out.  He exchanged mine several times over a number of years, and finally swapped the C11 for a, IIRC, C25, which behaves much better.

Regards,
Ray L.
Title: Re: Axis' accumulating error - need to emulate Mach3 output for testing
Post by: Scott Kelley on May 03, 2011, 05:51:13 AM
Interesting... I will take a look at signals on both sides of the optos tomorrow.

Some more food for thought:

I just ran a test on the servo itself that indicates that the servo is registering fewer pulses in one direction than Mach is supposed to be sending.  (missing approximately 10-30 pulses per 30,000 sent).

The errors occur only in one direction - the count in the other direction is dead on every time.  Seems to me that the step pulse would be the same in either direction, so would expect the same error both directions...

The number of errors per inch decreases as the feed rate is decreased.

Changed step pulse width setting to 1 uS and tested, then to 5 uS and tested.  Did not see a significant difference.  Would expect 1 uS to cause significantly more problem if it was caused by slow circuitry.  But then, I was not looking at the signals, so can't verify  that the change even occurred.  

Since I started this, I have done many things to eliminate any possible noise on the signal lines - None of those changes has made a single bit of difference, and they are now nowhere near anything noisy.  





Title: Re: Axis' accumulating error - need to emulate Mach3 output for testing
Post by: Hood on May 03, 2011, 06:40:23 AM
The biggest thing you can do to make Step/Dir noise resistant is to make them differential. All my servo drives can accept single or differential so I make sure I take advantage of them being capable of differential by using it.
Not saying thats your problem and not even sure if your drives can accept differential but its something to consider as it makes wiring less problematic.
Hood
Title: Re: Axis' accumulating error - need to emulate Mach3 output for testing
Post by: Scott Kelley on May 03, 2011, 06:53:18 AM
I have neither differential inputs nor outputs.  The point that I was trying to make with my last statement is that I don't think that the problem is noise on those lines, because if that was the problem, it would have at least been improved by the dramatic changes that I have made while trying to run down this problem, and I have actually seen NO CHANGE at all.
Title: Re: Axis' accumulating error - need to emulate Mach3 output for testing
Post by: arturod on May 03, 2011, 08:49:42 AM
Scott,

I received your support ticket.  Thanks for the links.
I know double optoisolation can be very tricky, and we have had problems with this in the past.  I can assure you this has nothing to do with the problem you are experiencing now.  Depending on the board, some can optoisolated at 100khz and others at 1Mhz.

I presume this is the board you bought back in 2008.  Are you just setting this up now, or was it working ok and then it started having problems?

The problem you are describing makes me think that the board is underpowered.  Possible causes for this are:
-   Problems with the power supply.
-   External short draining power from the system.
-   Damaged chip on the board, which can create an internal short, leaving other chips underpowered.

I suggest you take a look at this guide for trouble shooting this with your board: 

Please let me know how it goes.

Arturo Duncan
http://cnc4pc.com
Title: Re: Axis' accumulating error - need to emulate Mach3 output for testing
Post by: zarzul on May 07, 2011, 12:23:38 PM
Scott,

I had this same type of problem with a New Hermes engraver that I converted to run from Mach3,  The opto were too slow. 
It manifested the problem by climbing in the z, x & y axis all in one direction. 
I was doing some text engraving and the letters ran at an up hill angle, getting lighter and lighter, and closer and closer spacing.
Since the driver board was all TTL circuits I simply jumpered out the opto isolators.

Title: Re: Axis' accumulating error - need to emulate Mach3 output for testing
Post by: Scott Kelley on May 07, 2011, 02:44:56 PM
Right now it seems like that is where the problem lies for me as well.  Need to do some more testing to be sure.
Thanks
Scott