Page 1 of 2 12 LastLast
Results 1 to 12 of 14

Thread: Help with a Square

  1. #1
    Registered
    Join Date
    Feb 2011
    Location
    USA
    Posts
    5
    Downloads
    0
    Uploads
    0

    Help with a Square

    I am very new to G-code! I have circles down, but need to do a square now. What I have is:

    The stock is a square tube 5x3x37" and I need three square holes in the 3" side. One half inch in from the end, 11” long and 2.5" wide. This is what I came up with. Oh yea the mill is only 2d so all I have is X and Y.

    My ref will be set to X 0 Y 0 at the outside left corner.

    g0 x .5 y .25
    g42 g0 x 0.09375 y 0.09375 Off set for 3/16” bit
    g1 y 2.5
    g1 x 11
    g1 y -2.5
    g1 x -11
    g40

    Will this work or am I missing something?
    Last edited by tbitt1; 02-08-2011 at 12:53 PM. Reason: Updated measurements


  2. #2
    Registered
    Join Date
    Feb 2006
    Location
    india
    Posts
    1,273
    Downloads
    0
    Uploads
    0
    Post your drawing.

    Need to insert G91 after first positioning.
    Z movement to be included.
    In the G42 G00 block, the coordinates of one corner of the square should be specified.


  3. #3
    Registered neilw20's Avatar
    Join Date
    Jun 2007
    Location
    Australia
    Posts
    3,421
    Downloads
    0
    Uploads
    0
    Just my opinion, but for simple things it easier to do without cutter offset.
    Then you don't have to worry about some hard to control approach mystery.
    Not knocking G41 stuff, but KISS. Keep It Simple Stupid.
    Are you trying to plunge a hole.
    How is it going to start? You control the Z? Then you need to pause to do it with M0.
    Super X3. 3600rpm. Sheridan 6"x24" Lathe + more. Three ways to fix things: The right way, the other way, and maybe your way, which is possibly a faster wrong way.


  4. #4
    Registered
    Join Date
    Feb 2011
    Location
    USA
    Posts
    5
    Downloads
    0
    Uploads
    0
    Quote Originally Posted by neilw20 View Post
    Just my opinion, but for simple things it easier to do without cutter offset.
    Then you don't have to worry about some hard to control approach mystery.
    Not knocking G41 stuff, but KISS. Keep It Simple Stupid.
    Are you trying to plunge a hole.
    How is it going to start? You control the Z? Then you need to pause to do it with M0.
    If I do not do the G41 offset, will the hole be the correct size? Or do I account for the bit size in my measurements? I do not have powered Z so I step thru the program and plunge the Z. I got a chance to step thru it last night, it look good, but like I said I have only been it this for about a week. If their is a better way, I am all ears.


  • #5
    Registered neilw20's Avatar
    Join Date
    Jun 2007
    Location
    Australia
    Posts
    3,421
    Downloads
    0
    Uploads
    0
    Just put the offset in in your toolpath, off by the radius.
    Put a M0 whenever you need it to pause to move the Z manually.
    Hit cycle start to continue until next M0, or just single step, and never walk away. Problem with G41 is thew is a preparatory move, which is no problem on the outside of something, but inside, To overcome this, I do the weird moves above the job, then ramp down after the dirty bit.
    When there is nowhere to go but cut, you really don't want those weird moves.
    Or you can use liberal M1s and turn optional stop on and off as required to stop. I use F4 key as a hot key to toggle optional stop. That is emergency pause, for my wife.
    Last edited by neilw20; 02-09-2011 at 06:52 AM. Reason: typos and dumb grammar
    Super X3. 3600rpm. Sheridan 6"x24" Lathe + more. Three ways to fix things: The right way, the other way, and maybe your way, which is possibly a faster wrong way.


  • #6
    Registered headsmess's Avatar
    Join Date
    Oct 2010
    Location
    australia
    Posts
    80
    Downloads
    0
    Uploads
    0
    Quote Originally Posted by neilw20 View Post
    Just put the offset in in your toolpath, off by the radius.
    Put a M0 whenever you need it to pause to move the Z manually.
    Hit cycle start to continue until next M0, or just single step, and never walk away. Problem with G41 is thew is a preparatory move, which is no problem on the outside of something, but inside, To overcome this, I do the weird moves above the job, then ramp down after the dirty bit.
    When there is nowhere to go but cut, you really don't want those weird moves.
    Or you can use liberal M1s and turn optional stop on and off as required to stop. I use F4 key as a hot key to toggle optional stop. That is emergency pause, for my wife.
    ima listening....


    its quite easy what neil is saying. reduce your hole dimensions by the tool diameter. thats a radius to each side. then a simple code along the lines of

    go1 x0 y0
    x10y0
    x10y10
    x0y10
    x0y0.

    a very basic square.

    its rough. it has no feed controls, no offsets... nothing to confuse you...

    chuck in f100 say... and the m0 every second line...

    but its kiss and as long as your setup is right... rethink your reference... it works.


  • #7
    Registered
    Join Date
    Feb 2011
    Location
    USA
    Posts
    5
    Downloads
    0
    Uploads
    0
    Quote Originally Posted by headsmess View Post
    ima listening....


    its quite easy what neil is saying. reduce your hole dimensions by the tool diameter. thats a radius to each side. then a simple code along the lines of

    go1 x0 y0
    x10y0
    x10y10
    x0y10
    x0y0.

    a very basic square.

    its rough. it has no feed controls, no offsets... nothing to confuse you...

    chuck in f100 say... and the m0 every second line...

    but its kiss and as long as your setup is right... rethink your reference... it works.
    I would like to start with, thanks for all the great replies!

    How does this look?

    Reference being X 0 Y 0

    g0 x 0 y 0
    g1 y 2.40625
    m0
    g1 x 10.90625
    m0
    g1 y -2.40625
    m0
    g1 x -10.90625
    m0

    Thanks again


  • #8
    Registered neilw20's Avatar
    Join Date
    Jun 2007
    Location
    Australia
    Posts
    3,421
    Downloads
    0
    Uploads
    0
    You can round those to 4 decimal places.
    Do you really think your machine can resolve 0.00001 ??
    Add some comments so that the prompt line makes sense (next week)
    You must select a feed for G1 to work

    Code:
    G0 X0 Y0
    G1 y2.4063 F10 (You must have a FEED or G1 will complain)
    m0 (Turn ON spindle, and MOVE Z DOWN)
    X10.9063 
    M0 
    Y-2.4062
    M0
    X-10.9062
    M0 (RETRACT Z NOW)
    G0 (maybe not a good idea in your case)
    M30 (End of program)
    This will work OK.
    Spaces for clarity, but keep the numbers with their respective letters for readability.
    G0 and G1 are modal, so don't keep repeating yourself.
    Less stuff means improved readability
    Last edited by neilw20; 02-09-2011 at 03:14 PM. Reason: Extra thoughts
    Super X3. 3600rpm. Sheridan 6"x24" Lathe + more. Three ways to fix things: The right way, the other way, and maybe your way, which is possibly a faster wrong way.


  • #9
    Registered
    Join Date
    Feb 2011
    Location
    USA
    Posts
    5
    Downloads
    0
    Uploads
    0
    Neil,
    Great, Thank you very much!


  • #10
    Registered headsmess's Avatar
    Join Date
    Oct 2010
    Location
    australia
    Posts
    80
    Downloads
    0
    Uploads
    0
    is that code absolute or incremental?

    not to be picky but i see a square of 5 by 20 inches here... 0,0 being the centre.

    at least the way i use my machine...

    Help with a Square-square.jpg

    a quick pic.

    white square. your material.

    grey square, hole. the corners shall be radius, of course.

    red square is the tool path.

    green circle is cutter at 0,0 (already subtracting tool radius)

    opposite corner would be X5 Y2.5 minus, again, tool radius. two radii make a diameter

    the way i work, (aasuming this to be a 5" by something hole...)the purple circle is at approx X2.5 Y2.41967283 whatever it was ( ), with the tool heading TOWARDS X0 Ywhatever it was...

    OR,, the cutter is moving AWAY FROM X0 Y whatever it is... (in the X axis only!)

    get the idea?

    then you must consider...to hold X at 0, and move Y first? or to hold Y at 0, and move X?

    (ie;

    X0 Y0
    X0 Y10
    X10 Y10
    versus

    X0 Y0
    X10 Y0
    X10 Y10...)


    which way you go depends on machine capabilities. cutter turns clockwise from above. to travel X first results in CLIMB MILLING, Y first is conventional milling. when doing an inside cut.

    move Y first if you have backlash, so the hole is cut in a CLOCKWISE direction... yes, it is important!

    confusing?

    this is basic!


  • #11
    Registered
    Join Date
    Feb 2011
    Location
    USA
    Posts
    5
    Downloads
    0
    Uploads
    0
    the G-Code is in incremental or Relative.


  • #12
    Registered neilw20's Avatar
    Join Date
    Jun 2007
    Location
    Australia
    Posts
    3,421
    Downloads
    0
    Uploads
    0
    Not incremental.
    This code described here is absolute.
    Super X3. 3600rpm. Sheridan 6"x24" Lathe + more. Three ways to fix things: The right way, the other way, and maybe your way, which is possibly a faster wrong way.


  • Page 1 of 2 12 LastLast

    Similar Threads

    1. How square is enough?
      By zeeway in forum DIY CNC Router Table Machines
      Replies: 7
      Last Post: 12-03-2009, 06:22 AM
    2. 3mm square 16 pin QFN
      By powerr in forum PCB milling
      Replies: 3
      Last Post: 11-06-2009, 02:09 PM
    3. Newbie- Square hole in square tube
      By bubblybill in forum General Metalwork Discussion
      Replies: 6
      Last Post: 09-20-2009, 11:18 PM
    4. Square
      By hydrogen in forum DIY CNC Router Table Machines
      Replies: 8
      Last Post: 05-28-2008, 12:39 AM
    5. WOn't cut square!
      By Ed_R in forum DIY CNC Router Table Machines
      Replies: 51
      Last Post: 03-23-2006, 06:19 AM

    Posting Permissions


     


    About CNCzone.com

      We are the largest and most active discussion forum from DIY CNC Machines to the Cad/Cam software to run them. The site is 100% free to join and use, so join today!

    Follow us on

    Facebook Dribbble RSS Feed


    Search Engine Friendly URLs by vBSEO ©2011, Crawlability, Inc.