584,800 active members*
4,624 visitors online*
Register for free
Login
Results 1 to 7 of 7
  1. #1
    Join Date
    Mar 2008
    Posts
    452

    Weird results with G-Code

    I'm having trouble with Mach3 and G-Code.
    The computer I use for design has Mach3 installed on it and the results from this code shows just fine.
    But when I load it on the PC that is actually connected to the CNC, one circle is HUGE!
    its line 57 on the attached G-Code file: I had to rename the file extension to .txt so it will post here
    G2 X74.3 Y34.353 I-26.675 J9.747

    Units are in MM
    that gcode line is supposed to make a 2in circle (50.8mm)
    But on the CNC pc it tried to draw like a 2-foot circle!

    Is there a setting I may have differently between the two?
    Attached Files Attached Files

  2. #2
    Join Date
    Jan 2018
    Posts
    1516
    Quote Originally Posted by viroy View Post
    I'm having trouble with Mach3 and G-Code.
    The computer I use for design has Mach3 installed on it and the results from this code shows just fine.
    But when I load it on the PC that is actually connected to the CNC, one circle is HUGE!
    its line 57 on the attached G-Code file: I had to rename the file extension to .txt so it will post here
    G2 X74.3 Y34.353 I-26.675 J9.747

    Units are in MM
    that gcode line is supposed to make a 2in circle (50.8mm)
    But on the CNC pc it tried to draw like a 2-foot circle!

    Is there a setting I may have differently between the two?
    1. You may have 'native units' in Mach set to inches.
    2. I cannot see a G21 in your code which tells machine 'run g in mm'.

    Try adding a single G21 to the top of your code between the
    G80 G49 G40 and G54 lines.
    Like:
    G90 G17
    G80 G49 G40
    G21
    G54

    G20= run g in inches, G21=run g in mm.


    Edit:
    Not sure about I and J codes though.
    I= distance along x axis to center of circle.
    J= distance along y axis to center.
    I use radius moves so I'm not familiar with it.

  3. #3
    Join Date
    Mar 2008
    Posts
    452

    Re: Weird results with G-Code

    If it was a unit problem, would they all be big? its just the one circle thats larger.

    ok so it appears to be a problem with Mach3 settings.
    I reloaded Mach3 and poof, the gcode appears perfectly in the display window.
    But then if I load the modified XML file that came with the BOB card... that one circle is gigantic.
    So it definitely has to be a setting in Mach3

    I attached the two XML files... I had to rename the file extensions from XML to TXT to attach in the post
    Im not sure what the difference is causing the problem
    Attached Files Attached Files

  4. #4
    Join Date
    Jan 2018
    Posts
    1516
    Quote Originally Posted by viroy View Post
    If it was a unit problem, would they all be big? its just the one circle thats larger.
    ok so it appears to be a problem with Mach3 settings.
    I reloaded Mach3 and poof, the gcode appears perfectly in the display window.
    But then if I load the modified XML file that came with the BOB card... that one circle is gigantic.
    So it definitely has to be a setting in Mach3
    I attached the two XML files... I had to rename the file extensions from XML to TXT to attach in the post
    Im not sure what the difference is causing the problem
    I haven't compared them but....
    All the XML file does is saves and remembers your settings for Mach.
    If you know all your Mach settings or can set it up easily enough yourself, you don't need the supplied XML file. And there's always a few things you end up changing anyway.

    Then once you've got Mach set up yourself, you copy your XML file to an external device. So if your computer fails you can just copy it over onto a new one when you've installed Mach and away you go again.

  5. #5
    Join Date
    Nov 2013
    Posts
    4280

    Re: Weird results with G-Code

    Hi,
    Mach3 is natively in Incremental Arc mode whereas a lot of CAM programs generate code in Absolute Arc mode.
    Everything looks great until you load it on the machine and what should be a small arc turns out to be many inches or even feet round.
    Make sure Machs Arc mode matches the code your feeding it.

    Craig

  6. #6
    Join Date
    Mar 2008
    Posts
    452

    Re: Weird results with G-Code

    Can you elaborate on the arc mode?
    Where is the setting for it in Mach3?

  7. #7
    Join Date
    Mar 2008
    Posts
    452

    Re: Weird results with G-Code

    AHA!
    Basically did a settings wardial, its the IJ Mode in General Config
    Need to be on Incremental, not Absolute

    Prob solved yay
    Thanks guys!

Similar Threads

  1. Weird alarm code
    By JOHNSMITTY in forum Okuma
    Replies: 1
    Last Post: 03-04-2024, 08:25 AM
  2. G-Code weird thing.
    By NeoTech in forum Autodesk Post Processors
    Replies: 2
    Last Post: 04-05-2016, 08:56 PM
  3. weird code when using predator
    By NIS3R in forum BobCad-Cam
    Replies: 0
    Last Post: 10-01-2011, 10:39 PM
  4. Poor results, help please!
    By Swede in forum Hard / High Speed Machining
    Replies: 8
    Last Post: 04-04-2004, 05:23 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •