Hello Guest it is December 26, 2024, 10:30:53 PM

Author Topic: Z-Axis Not Always Positioned Correctly  (Read 6201 times)

0 Members and 1 Guest are viewing this topic.

Z-Axis Not Always Positioned Correctly
« on: December 11, 2015, 12:05:27 PM »
I have a newly built system based loosely on the ShapeOko unit. I don't have any limit or home switches currently installed but I wanted to run some initial tests first to check that everything was running correctly. I used Fusion 360 to create a 3" square and made the square 0.478" thick to match the plywood stock I have. Since I don't have home switches installed I manually move the spindle to my home position, then shut down Mach3 and restart it. I then move the spindle to the corner and top of my stock, zero the DROs, load the file and run.

When I'm done I end up with a square that is 3" x 3" but the thickness is less than 0.478", it's closer to 0.38". When the job is done and I tell the machine to go to zero it moves to the correct X and Y but Z is above the stock, probably by the amount that it didn't cut.

I've done this about 4 times and only once did I get the correct thickness cut. I made another test with a different file after my successful cut but it too wasn't cut deep enough (it was a different program).

I've searched and read posts and videos but can't seem to find the source of my mistake. Can someone help me determine what is wrong with my procedure that is causing this?

Thanks,
George

Here's the GCode generated by Fusion 360 that I'm using for the 3" square test.


Code: [Select]
(SQUARE-3IN_V2)
(3 SQUARE TEST CUT)
(T1  D=0.25 CR=0. - ZMIN=-0.478 - FLAT END MILL)
G90 G94 G91.1 G40 G49 G17
G20
G28 G91 Z0.
G90

(2D CONTOUR1)
M5
M9
T1 M6
S14000 M3
G54
M9
G0 X0.8 Y2.475
G43 Z0.6 H1
Z0.2
G1 Z0.1644 F240.
Z-0.1 F80.
G18 G2 X0.825 Z-0.125 R0.025
G1 X0.85 F240.
G17 G3 X0.875 Y2.5 R0.025
G1 Y4.
G2 X1. Y4.125 R0.125
G1 X4.
G2 X4.125 Y4. R0.125
G1 Y1.
G2 X4. Y0.875 R0.125
G1 X1.
G2 X0.875 Y1. R0.125
G1 Y2.5
G3 X0.85 Y2.525 R0.025
G1 X0.825
G18 G3 X0.8 Z-0.1 R0.025
G1 Y2.475
Z-0.225 F80.
G2 X0.825 Z-0.25 R0.025
G1 X0.85 F240.
G17 G3 X0.875 Y2.5 R0.025
G1 Y4.
G2 X1. Y4.125 R0.125
G1 X4.
G2 X4.125 Y4. R0.125
G1 Y1.
G2 X4. Y0.875 R0.125
G1 X1.
G2 X0.875 Y1. R0.125
G1 Y2.5
G3 X0.85 Y2.525 R0.025
G1 X0.825
G18 G3 X0.8 Z-0.225 R0.025
G1 Y2.475
Z-0.35 F80.
G2 X0.825 Z-0.375 R0.025
G1 X0.85 F240.
G17 G3 X0.875 Y2.5 R0.025
G1 Y4.
G2 X1. Y4.125 R0.125
G1 X4.
G2 X4.125 Y4. R0.125
G1 Y1.
G2 X4. Y0.875 R0.125
G1 X1.
G2 X0.875 Y1. R0.125
G1 Y2.5
G3 X0.85 Y2.525 R0.025
G1 X0.825
G18 G3 X0.8 Z-0.35 R0.025
G1 Y2.475
Z-0.453 F80.
G2 X0.825 Z-0.478 R0.025
G1 X0.85 F240.
G17 G3 X0.875 Y2.5 R0.025
G1 Y4.
G2 X1. Y4.125 R0.125
G1 X4.
G2 X4.125 Y4. R0.125
G1 Y1.
G2 X4. Y0.875 R0.125
G1 X1.
G2 X0.875 Y1. R0.125
G1 Y2.5
G3 X0.85 Y2.525 R0.025
G1 X0.825
G18 G3 X0.8 Z-0.453 R0.025
G0 Z0.6
G17

M9
G28 G91 Z0.
G28 X0. Y0.
M30
Re: Z-Axis Not Always Positioned Correctly
« Reply #1 on: December 11, 2015, 01:59:38 PM »
I didn't run your code, but it sounds like you might be loosing steps while plunging or possibly the tool is slipping up into the holder.

(assuming steppers)

Russ
Re: Z-Axis Not Always Positioned Correctly
« Reply #2 on: December 11, 2015, 04:37:29 PM »
Yes, I am running steppers. I'm running a 1/4" bit and taking 4 passes to get down to ~3/4" depth so I would suspect I'd be loosing steps. The Z-Axis is on a lead screw while the X & Y are on belts. The Z-Axis is running on a different motor controller though. I'm not in front of the machine but I think it is set to 4800 steps per unit while the X/Y are 508. I have the frequency set at 35kHz and when I check it it seems pretty solid.
Re: Z-Axis Not Always Positioned Correctly
« Reply #3 on: December 11, 2015, 06:54:30 PM »
I ran the circular pattern wizard and set the depth to 0.5" and 6 holes. I ran this test twice and all 6 holes both times were only 0.49" deep. About the only thing this tells me is that it's not something with the 3" square code I created in Fusion 360. Every time I measure the Z Axis movement it checks out perfectly (move 1", measure 1").

I'm continuing to look online but have yet to find something which would cause this so I'm crossing my fingers someone has a solution or at least something else to double check.
Re: Z-Axis Not Always Positioned Correctly
« Reply #4 on: December 11, 2015, 07:09:25 PM »
So if you move the tool to Z=0 is the tip of your tool right on the surface?  Did you use 0.010" feeler gauge to set the tool and forget to compensate for it?  I like using a 1/2" precision roll pin to set tools.  Keeps the tool away from my part far enough that an oops jog won't hit.  You roll it back and forth under the tool as you jog and it finds the lowest point on the cutter, not the lowest point where the block or feeler gauge is.
Re: Z-Axis Not Always Positioned Correctly
« Reply #5 on: December 11, 2015, 07:57:28 PM »
Well if I hit the "GOTO ZERO" button in the DRO section the tool does go back to just on top of the material. At least that's what seems to be happening when I run the GCode produced by the hole pattern wizard. When I was checking after the GCode posted above (made by Fusion 360) it seemed to return to a position above the stock (even though I zeroed on top of the stock).

No, I have not introduced a feeler gauge or tool setup gauge. I have one but I thought I would walk before I ran but it seems I can't even walk yet. I'm really at a loss here but it seems like it has to be something simple I've overlooked.
Re: Z-Axis Not Always Positioned Correctly
« Reply #6 on: December 11, 2015, 09:45:05 PM »
Reduce the accel and vel for the Z in Motor Tuning and run it some more.
Might also incr3ease the pulse widths for the Z too.
.010" might be difficult to measure accurately with plywood.

You might also skim cut the surface and set Z0 at that actual level, then test the depth of cut.

Still sounds like missed steps. You mention a different driver for the Z too .... how different ?

Russ
Re: Z-Axis Not Always Positioned Correctly
« Reply #7 on: December 11, 2015, 10:18:24 PM »
No, this isn't 0.01" difference, it's 0.1" and it's always not cutting deep enough by ~0.1". I ran through some of the wizards and 1 out of ~4 times I was able to get a depth of 0.5". I did slow the feed rate down to 1 and that didn't seem to make a difference in the depth.

There is 1 controller board using Sanken SLA7078MPR driver chips which drives the Y, Z, and a slaved A axis to the Z (dual motors on the gantry). The Z-Axis is being driven by a TI DRV8825 on a different board.

Right now I have Z Axis motor tuning set with 4800 steps, velocity of 100, and acceleration of 10. I did have those lower the other day but today I went through the tuning again and played with the settings and the motor seemed to be running just fine at these levels. I used a feed rate of 5 and 1 in the wizards and that didn't seem to make a difference.

I'm actually cutting MDF (1 test I used plywood) so I would think that's about the easiest of materials to cut (short of foam and thin plastics). It's a 1/4" bit and most of the DOC are at 0.2" so I wouldn't think I'm stressing .

The X/A/Y Axis motors are NEMA 23 MotionKing 23HS8530-01A (3.0A, 1.8deg/step, 1 ohm, 1.8mH) while the Z Axis is a Nema 23 Sanyo Denki 103H7126-5040 (2.0A, 1.8 deg/step, can't seem to find the actual datasheet).

If you're still thinking it's missed steps should I lower the kernel speed to 25kHz and run 1 of the wizards with a feed rate of 1?

Offline Tweakie.CNC

*
  • *
  •  9,279 9,279
  • Super Kitty
Re: Z-Axis Not Always Positioned Correctly
« Reply #8 on: December 12, 2015, 02:21:18 AM »
Reducing the Feed-Rate and lowering the Velocity are two entirely different things as far as machine performance is concerned.

Try...
  
(as you have suggested) reducing the Kernel to 25kHz.
Reducing the Velocity for the Z axis to 60 (save the change).


Tweakie.
« Last Edit: December 13, 2015, 01:39:18 AM by Tweakie.CNC »
PEACE
Re: Z-Axis Not Always Positioned Correctly
« Reply #9 on: December 12, 2015, 11:12:11 AM »
I'll be making the suggested changes later today and will report the findings but I have some questions.

  • Do you think reducing the microstepping on the Z Axis driver so it takes less pulses to move 1" will have any impact on the results?
  • The pulse width is set to 5us for step/dir on all axis. The TI driver has a minimum pulse width of 1.9us so this should be OK, right?
  • I was running the driver test and checking all frequencies. Even up to 100kHz it reports the system is OK. I noticed that up to 65kHz the CPU usage is less than 5% but 100kHz is ~50% but I don't see any reason to push it that high. When I look at Max Variation I see mostly repeatable spikes and values of 15us or 23us. This doesn't seem to change when I change the frequency but occasionally I see nice smooth line aith maybe variations of 5-8us. Is ~20us variation something to worry about? Should I break out the scope and see what the step pulses actually look like?

Thanks again for helping me get through this.