# Machsupport Forum

## Mach Discussion => General Mach Discussion => Topic started by: John Lovaasen on April 19, 2012, 12:35:42 PM

Title: X & Y Driver/Configuration Issues
Post by: John Lovaasen on April 19, 2012, 12:35:42 PM
Hi, I'm having some problems getting my X-axis and Y-axis jogging properly. The 3 KL 4030 drivers will all work for the Z-axis, but not for the X or Y. I'm using KL 4030 driver, C10 BOB, and Mach3 software.

Here is what my machine is doing. When I jog the X or Y axis in one direction, the axis moves back and forth (side to side) only about 1mm.

I believe that I'm calculating the Mach3 steps per 1mm movement correct, but maybe someone could verify them for me. The X and Y axis are belt driven with 1 motor revolution per 44mm which equals 0.023 revs/mm. I have the drivers half-stepping so the Mach3 steps per motor revolution is 400 steps/motor rev. So the Mach3 steps per unit (1mm) is equal to the steps/motor rev times the motor revs/mm which is 0.023*400=9.52 Mach3 steps per 1mm movement (seems low??).

I also tried the corresponding steps/mm for 1/8 and 1/32 stepping, but still had the same back and forth movement. Do these seem like a low numbers for steps/mm? How much effect would changing the velocity or acceleration cause? Thanks for the help. John.
Title: Re: X & Y Driver/Configuration Issues
Post by: Hood on April 19, 2012, 01:58:43 PM
I make it 9.0909 steps per mm when on half stepping 400steps = 44mm so 400/44= 9.0909 steps per mm.

That in itself would not cause the issue although it is a very course step per mm.

Are you sure you have the Step and Dir pins assigned the right way round?

Hood

Title: Re: X & Y Driver/Configuration Issues
Post by: John Lovaasen on April 19, 2012, 02:12:11 PM
I believe that I have the Step and Dir pins assigned correctly. From the x-axis driver, Dir - goes to pin2 on the C10, COM is 5V, Step - goes to pin3, and and so on for y and z axis'. In Mach3, I setup Step Pin# 3, Dir Pin# 2, enabled and both set at active low. In the wiring diagram I have for KL4030 with C10, the Step- goes to pin 2 and Dir- to pin 3 (reverse of what I have), but as long as I assign it to the right pin in Mach3 it shouldn't matter, correct?
Title: Re: X & Y Driver/Configuration Issues
Post by: Hood on April 19, 2012, 02:30:17 PM
As long as Mach is assigned to the pins you are using then its no problem as you say.
Other thing to check is you have the dip switch for Ste/Dir set the correct way as if its on CW/CCW then it may cause problems like you are seeing.
Hood
Title: Re: X & Y Driver/Configuration Issues
Post by: John Lovaasen on April 19, 2012, 02:49:59 PM
For CW/CCW mode, I would set M1/M2/M3 to 0/0/0, correct? For step/dir mode (say 1/2 stepping), I would set M1/M2/M3 to 0/1/1, correct? I don't see a specific dip switch for switching between cw/ccw and step/dir modes.
Title: Re: X & Y Driver/Configuration Issues
Post by: Hood on April 19, 2012, 03:08:22 PM
I have not looked at the manual for the drives so dont really know which dips are which but I just know the leadshine drives do have the option.
Hood
Title: Re: X & Y Driver/Configuration Issues
Post by: Hood on April 19, 2012, 03:18:49 PM
Can only find a data sheet for it and dont see any dips for choosing between Step/Dir and CW/CCW so maybe it is auto on these model of drives?
M1 to M3 are for setting the stepping according to the sheet.

When you say they all work for the Z I am assuming you physically swapped the drives around? What happens if you connect to the same pins on the Breakout board that the Z uses and set them as X or Y. What I am wondering is if its a breakout board problem.

Hood
Title: Re: X & Y Driver/Configuration Issues
Post by: John Lovaasen on April 19, 2012, 03:41:05 PM
For the Z-axis, I power down everything, unplug all motors, and plug the Z-axis motor into the X or Y driver and change the steps/mm to match the Z-axis. Once powered back on, using the X or Y jog works for the Z-axis. I've tried running each axis by itself on each driver, but Z-axis is the only one jogging. I just tried swapping the pin assignments for the Z and Y in Ports and Pins, but still only have the Z-axis jogging while the Y-axis doesn't.

I did notice in the manual that the Dir pulse needs to be 5us ahead of the Step pulse, but I'm unsure where to set that. Is that the Step Pulse 1-5us and Dir Pulse 0-5us in the Motor Tuning and Setup configuration window? Right now, both are set at 0.
Title: Re: X & Y Driver/Configuration Issues
Post by: Hood on April 19, 2012, 04:20:44 PM
That would suggest either you have the X and Y motors wired incorrectly or they are faulty.
Hood
Title: Re: X & Y Driver/Configuration Issues
Post by: John Lovaasen on April 19, 2012, 05:58:02 PM
I hooked up my other CNC table to the drivers and miraculously they worked. It should be just a matter of tuning the motors to get smooth operation.
Title: Re: X & Y Driver/Configuration Issues
Post by: Hood on April 20, 2012, 01:56:22 AM
If you were using the motors on the other table then it still makes it sound like the motors are faulty or wired incorrectly on the original machine.
Hood
Title: Re: X & Y Driver/Configuration Issues
Post by: John Lovaasen on April 20, 2012, 09:07:17 AM
Nope, I should have mentioned my other table has different motors on it. Sorry. I'll have to take another look at the motors that are faulty to see if there is something I'm overlooking. Thanks for the help Hood!
Title: Re: X & Y Driver/Configuration Issues
Post by: John Lovaasen on April 20, 2012, 02:51:18 PM
I have every axis running smoothly and the correct distances! Thanks again! But I do have one problem with the Z-axis. When I travel down the movement is very smooth, but when I travel up the movement is a little jerky and may be missing some steps. The Z-axis is a 2mm pitch screw (1 start) so at 1/2 stepping I set the Z-axis to 200 Mach3 steps/mm, and set the velocity to 1200mm/min and acceleration to 2000mm/sec/sec. I have also tried the other micro-stepping configurations with their corresponding Mach3 steps/mm, but have the same jerky movement travelling up and smooth travelling down. Any ideas?
Title: Re: X & Y Driver/Configuration Issues
Post by: Hood on April 20, 2012, 03:25:13 PM
What I was meaning when I said "If you were using the motors on the other table" eas that you were using motors from the other machine and not the ones you couldnt get working.

So presume it was a wiring issue?

Sounds like your Z motor is either too small, you have accel and velocity set too high or there are some really sticky patches on your axis.
Hood
Title: Re: X & Y Driver/Configuration Issues
Post by: John Lovaasen on April 23, 2012, 12:59:16 PM
I noticed some rust on the end of the screw so I cleaned it up and lubricated the screw, and all is working great! Thanks for the help Hood!