586,395 active members*
2,807 visitors online*
Register for free
Login
IndustryArena Forum > Other Machines > PCB milling > PCB GCODE zeros of top and bottom layer don't match!
Results 1 to 8 of 8
  1. #1
    Join Date
    Jul 2013
    Posts
    27

    PCB GCODE zeros of top and bottom layer don't match!

    Hello all.

    I am trying to mill a 2 sided board for my friend. I am using the pin-in-hole method to keep my board aligned when I flip it.

    My problem is that PCB GCODE is generating the bottom layer on the negative side of the x axis and the top, the positive side. How can I get the origin to be the bottom left side for each job?

    I have attached pictures to describe what I mean in greater detail.

    Attachment 254720Attachment 254722

  2. #2
    Join Date
    Mar 2004
    Posts
    1806

    Re: PCB GCODE zeros of top and bottom layer don't match!

    You don't get the origin to be bottom left for both sides! Try this, take a 3x5 card and lay it on the table. Put an X in the lower left corner (we will call this the top side).
    Now flip the card on the Y axis and where does the X land (hint it will be on the lower right side)! You need to learn how to use fixture offsets.

    I mill my top side on G54 and the bottom on G55! Yep, the origin is on the bottom left on the top and bottom right on the bottom. This way, I am flipping my board in the exact same space. To do it the way your looking at it, you will be strictly in G54 and the origin point has to be at the exact same location. This will require 2x the space to hold the board.
    Art
    AKA Country Bubba (Older Than Dirt)

  3. #3
    Join Date
    Jul 2013
    Posts
    27

    Re: PCB GCODE zeros of top and bottom layer don't match!

    Thanks bubba!

    Would you be so kind as to elaborate on the procedure (as far as the gcode goes) as my brain is having trouble visualizing it.

    Here's what I think I need to do:

    Set the home position (G53) at the bottom left corner of the board (I have no homing switches). I guess I should also set this point as G54?

    Next I would etch, drill and text the top side then stick my alignment pins in.

    At this point I need to set G55, which would be G53 + (width of board)???

  4. #4
    Join Date
    Mar 2004
    Posts
    1806

    Re: PCB GCODE zeros of top and bottom layer don't match!

    You have the basics correct!
    Now you have to modify the gcode to use G54 for the top of the board and G55 for the bottom of the board. Just insert that at the beginning of the file Basically (assuming your using mach) you will have to do nothing for the G54 as it will think your setting an offset for G54 automatically. Then using (I think G92 as I don't use Mach) set the origin for G55. Check your manual on how to do it.

    In my controller, the process is:
    1. Jog to the location of the origin.
    2. In MDI, I use the command "G5x G92 X0 YO" (without the quotes) and that will set the origin point. I actually have a fixture that is setup for using my standard sized board so I simply load the offsets after I home the machine. PERSONALLY, I would not have a machine without home switches as that makes doing offsets so easy!!
    Art
    AKA Country Bubba (Older Than Dirt)

  5. #5
    Join Date
    Jul 2013
    Posts
    27

    Re: PCB GCODE zeros of top and bottom layer don't match!

    Yeah I intended to add homing switches but before I got to that point I found some problems with my machine so I've been working to upgrade it.

    What switches do you recommend for homing? I have some of those switches with long metal arms that people seem to use but they don't look like they would be very repeatable...

    P.S. I'm using linux CNC

  6. #6
    Join Date
    Mar 2004
    Posts
    1806

    Re: PCB GCODE zeros of top and bottom layer don't match!

    On my router, I use hall effect switches (based on the thread here on the zone) and on my mill, I use some that have "metal arms" and based on my tests, they will repeat within less than .001"
    I used the mechanical switches on my mill when I set it up back about 15 years ago and the router was in the past couple of years. On the mill, I often do ferrous metals so would not want to use the hall effect and magnets for obvious reason. On the router, it is primarily for PCBs and plastics so this is not a problem.

    I don't use Linuxcnc either but the syntax is similar.
    Art
    AKA Country Bubba (Older Than Dirt)

  7. #7
    Join Date
    Jul 2013
    Posts
    27

    Re: PCB GCODE zeros of top and bottom layer don't match!

    Alright!

    I have one last question for you! What file did you edit to specify the top and bottom coordinate systems automatically? I can't seem to find the post-processor files used in pcbgcode.

  8. #8
    Join Date
    Mar 2004
    Posts
    1806

    Re: PCB GCODE zeros of top and bottom layer don't match!

    I modify the user-gcode.h file

    Examples that I use:

    FILE_BEGIN[BOTTOM] = "(Beginning of every bottom file)\n"
    "G55\n";
    FILE_BEGIN[TOP] = "(Beginning of every top file)\n"
    "G54\n";

    Also note the deleted ";" from the first line and added to the end of the newly inserted line. There is a pdf file on how to modify this file.
    Art
    AKA Country Bubba (Older Than Dirt)

Similar Threads

  1. Eliminating Tool marks in bottom of flat-bottom pocket
    By toyranosaur in forum MetalWork Discussion
    Replies: 13
    Last Post: 04-20-2012, 05:36 PM
  2. Layer after layer of color
    By cncadmin in forum EnRoute
    Replies: 0
    Last Post: 09-27-2011, 07:40 PM
  3. Mach 3 DRO/Gcode doesn't match
    By gbward4 in forum Mach Software (ArtSoft software)
    Replies: 4
    Last Post: 01-17-2011, 06:54 AM
  4. Zeros reset
    By jcambra in forum Mach Mill
    Replies: 1
    Last Post: 04-03-2010, 04:31 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
  •