Hello Guest it is May 15, 2021, 08:29:05 PM

Author Topic: g-code problem  (Read 256 times)

0 Members and 1 Guest are viewing this topic.

g-code problem
« on: March 09, 2020, 02:02:56 PM »
I am using Mastercam with a generic Fanuc post everything runs fine in Mastercam simulation, it also runs in our Kia  cnc lathe so why Mach4 butchers the program I don't know need some help to fix this .Exact stop dose nothing to address the issue .Someone please help me.

Offline smurph

  • *
  •  1,402 1,402
  • "That there... that's an RV."
    • View Profile
Re: g-code problem
« Reply #1 on: March 10, 2020, 05:11:21 AM »
Mach 4 isn't butchering anything.  Garbage in == garbage out.  :)

If you load that file, the status history will tell you what is wrong with it. 

File "C:\Mach4\GcodeFiles\valve test.NC", Line 18: K word given for arc in XY plane

You can't use I and K in the G17 (XY) plane.  G17 (XY plane) uses IJ, G18 (XZ plane) uses IK and G19 (YZ plane) uses JK.  Unless you changed it, Mach will startup in the G17 (XY) plane). 

So something is bogus coming out of the post processor.  So I don't know how that post is configured or if the drawing and CAM is setup for another plane, but it is wrong.  Also, there isn't a Safe Startup line in the G code that is normally defined by the post processor (maybe some setting?  I don't know MasterCAM).  The only thing in the header is G20.  If the CAM software is going to use use the G18 plane (XZ), then it should output G18 something like:

G20 G18 up at the top of the file somewhere. 

But if the MasterCAM post just can't do this, then, simply change the default Mach startup plane in the configuration dialog.  But I would lay odds that the post processor isn't configured correctly.