Monday 9 April 2018

Weird Z moves / Zref issues - WTF??

Thought I'd cracked this tool offset / Reference tool / G54 business. But it would appear not.

Tried to load and run the g code from my CAM session last night. Kept objecting "907 Z axis travel exceeded". The toolpath looked fine in the Fusion 360 simulation and when I check it in NCviewer I can't see any issue either. I showed screenshots of the Fusion toolpaths yesterday. Here's what NCviewer gives me

Without dots:



With dots, to give away any rogue moves that might not be apparent above:



Nothing odd there. But this is what I get if I run the program in the "graph" environment. This is basically a simulation that runs within the CNC12 software on the PC. It reckons the problem is in "line 15". 



It isn't always clear if that means the 15th line from the top (most likely) or line N15. 

In fact, the offending line is the 14th line down - in bold italics here:

%
O03331 (Conventional dish)
(T7  D=16. CR=8. - ZMIN=-8.853 - ball end mill)
N10 G90 G94 G17
N15 G21
N20 G28 G91 Z0.
N25 G90
(Adaptive1 (2))
N30 T7 M6
(16mm ball end mill)
N35 S1194 M3
N40 G54
N50 G0 X26.574 Y23.918
N55 G43 Z15. H7
N60 Z5.
...etc

It's trying to go to the clearance height (15mm above the stock surface), ahead of jogging down towards the work. If I comment out that line and rerun the simulation, it doesn't object. This is the 2D view with X axis along the bottom and Z axis up the side. The ~80mm move down is fair enough, as the quill top position is about 80mm above the work. That simply takes it to G54 Z0:



There's obviously a problem with my Z offsets / tool length offsets etc. If I try to run the line by itself in MDI (G43 Z15. H7), it tries to reach a point just below the end of travel and the hard limit is reached. The G54 Z coordinate displayed changes from ~+80 to +155, so clearly the application of the tool T07 length offset has moved the G54 origin by 75mm downwards.

And sure enough, the length offset for T07 is.....75mm. So, it's only when the controller applies the local tool lengths and axis limits that it can see there will be an issue. The graphing function sort of helps but it's not easy to get a perspective of the scales, so in practice you need to narrow the code down by trial and error. At least the error message gets you within a line or so of the problem.

I'm clearly confused and have managed to get my G54 Z0 screwed up badly. What a dumb prat - it's hardly rocket science. Time to read up on the tool library again. Hopefully this time some of it will stick....

There's a Youtube video by Centroid Keith that explains how to do it:


The music alone makes it worth watching. Note he is wearing a pager. That dates it....

No comments:

Post a Comment

Final assembly and test of the spindle nose adaptor - RESULT!!

After the recent distraction caused by the 3D scanner, resurrecting the 3D printer and buggering about with the throttle bodies for my Honda...