585,568 active members*
3,677 visitors online*
Register for free
Login
Results 1 to 14 of 14
  1. #1
    Join Date
    Mar 2017
    Posts
    926

    Newbie Linuxcnc g code set up question

    Now that my build is finished, I want to try running some G code in Linuxcnc. I downloaded a couple of test g code files (simple stuff like circles and smiley faces etc). They are all small enough to easily fit my work envelope but Linuxcnc seems to open every g code file with the machine's zero position in the center of the image. This puts 3/4 of the image outside the work envelope so Linuxcnc won't run it.... as it thinks the parts exceeds the limit of each axis.

    I searched through all of the drop-down menus but none of the options seem to move the g code image into the work area. I tried reading through the (very long) Linuxcnc user manual but I can't find any reference to my issue. I tried moving the zero position but the g code image moves with it.

    So... please can someone tell me how / where I can move the gcode file to the correct starting position?

  2. #2
    Join Date
    Aug 2009
    Posts
    1570

    Re: Newbie Linuxcnc g code set up question

    G10 L2 Set Coordinate System G Codes

  3. #3
    Join Date
    Jan 2005
    Posts
    1943

    Re: Newbie Linuxcnc g code set up question

    G10 L2 will work but LinuxCNC has a built in short cut for "touching off" . Simply jog the machine and then hit the "Touch Off" button. Enter the value you need in the popup for that axis, and then hit enter. This will set the zero of the selected work coordinate system axis. Do this for X Y and Z and you should be good to go.

    Also LinuxCNC opens a file based on how that particular file is written and how the axes are currently set, including the work coordinate systems. If your file is written such that part zero is in the center of the part, that is the reason it opens that way, not because LinuxCNC is forcing it into that position. Change your work coordinate system zero and all will be good.

  4. #4
    Join Date
    Mar 2017
    Posts
    926

    Re: Newbie Linuxcnc g code set up question

    Quote Originally Posted by 109jb View Post
    G10 L2 will work but LinuxCNC has a built in short cut for "touching off" . Simply jog the machine and then hit the "Touch Off" button. Enter the value you need in the popup for that axis, and then hit enter. This will set the zero of the selected work coordinate system axis. Do this for X Y and Z and you should be good to go.

    Also LinuxCNC opens a file based on how that particular file is written and how the axes are currently set, including the work coordinate systems. If your file is written such that part zero is in the center of the part, that is the reason it opens that way, not because LinuxCNC is forcing it into that position. Change your work coordinate system zero and all will be good.
    Thanks. I had a go at using the touch off button and I can see the work piece move in relation to the machine. It still seems to think that the work piece exceeds the machine limits though. I think there is a problem with how I set up the X and Y axis.

    When I move the X and Y axis, the movement it shows on-screen is in the opposite direction to how the machine moves. The z seems to be almost ok in that the spindle moves down when the on-screen cone moves down but it seems to randomly switch direction. I.e. Sometimes the up moves it down and sometimes the same button makes it move up...

    I tried reversing the travel in the stepconf wizard. I.e. Making the X axis move from 800mm to 0 instead of 0 to 800mm but that stopped the axis working at all. I tried moving the zero to 800mm instead of 0 but still no movement.

    I clearly have a lot of reading up to do so I can learn how to set the machine up correctly. I'm so confused about why it thinks a 100mm x 100mm work piece exceeds the limits on a machine with an 800mm x 300 mm work area.

  5. #5
    Join Date
    May 2015
    Posts
    686

    Re: Newbie Linuxcnc g code set up question

    A lot of the examples have a tool offset for the tool diameter so if you start a cut at 0,0, the machine cannot allow for the tool diameter. so jog in say 1" on the X and Y axes and move the Z axis down, then go through the touch off process. You should be good.
    Rod Webster
    www.vehiclemods.net.au

  6. #6
    Join Date
    Mar 2017
    Posts
    926

    Re: Newbie Linuxcnc g code set up question

    Quote Originally Posted by rodw View Post
    A lot of the examples have a tool offset for the tool diameter so if you start a cut at 0,0, the machine cannot allow for the tool diameter. so jog in say 1" on the X and Y axes and move the Z axis down, then go through the touch off process. You should be good.
    Thanks, that makes sense. Once I adjusted the offset for the tool, it started up and began drawing a smiley face on my spoil board.

    I think the rest of my issues are related to the weight of my Z axis. I have a 35lb spindle so I bought a 35lb gas spring from little machine shop, thinking it would make my Z axis effectively weightless. It didn't. Turns out that it takes a lot more than 35lb to push a 35lb gas spring. My Z motor seems to struggle at speeds lower than 2000mm per minute. It stutters and misses steps which then seems to get it confused about where it is and the direction it is moving.

    I clearly can't feed a job at 2000mm per minute so I need a different counter weight.

  7. #7
    Join Date
    May 2015
    Posts
    686

    Re: Newbie Linuxcnc g code set up question

    Sounds like your Z is operating at too slow a RPM to be in its optimum torque range. You have not given us much to go on. What size stepper motor (frame size and torque). What voltage are you running it at? What is your zaxis gearing? Ball screw? What pitch? Nema 23 and 48 volt should be able to lit 35 lb. Its not hard to build a belt reduction that mounts to the stepper frame mount. holes so they are easy to add.
    Rod Webster
    www.vehiclemods.net.au

  8. #8
    Join Date
    Mar 2017
    Posts
    926

    Re: Newbie Linuxcnc g code set up question

    Quote Originally Posted by rodw View Post
    Sounds like your Z is operating at too slow a RPM to be in its optimum torque range. You have not given us much to go on. What size stepper motor (frame size and torque). What voltage are you running it at? What is your zaxis gearing? Ball screw? What pitch? Nema 23 and 48 volt should be able to lit 35 lb. Its not hard to build a belt reduction that mounts to the stepper frame mount. holes so they are easy to add.

    I figured it out. It was a case of good old-fashioned user error (aka, I am an idiot). One of the 4 wires from the stepper had come loose from the screw terminal inside the DB9 connector. For reasons I'll never fully understand, it can move fine with 3 wires but only at high speed.

    Anyway, I reconnected the 4th wire and now it moves fine at high and low speed....

  9. #9
    Join Date
    Mar 2017
    Posts
    926

    Re: Newbie Linuxcnc g code set up question

    Please can someone explain where you measure the tool height offset from when setting up in Linuxcnc? Do I measure the amount the end mill protrudes from the end of the spindle (I.e. The bottom of the collet nut to tip of end mill) or is it the length of cut the end mill is capable of, or the total tool length etc?

    Where do you measure the work offset from when telling the machine where to start the job?,I.e is it the distance from the edge of the tool to the bottom corner of the blank stock you'll be cutting? Or the distance from the machine's zero to the blank stock? Or something else?

    I have a tool height setting device and I plan to buy some kind of edge finding probe thingy at some point but I would to understand how to do these things manually in Linux CNC first....

  10. #10
    Join Date
    Jan 2005
    Posts
    1943

    Re: Newbie Linuxcnc g code set up question

    The "Tool length offset" (TLO) can be done numerous ways. The TLO that you enter into the tool table is dependent on what you choose to be your "master Height". I'll give an example

    Suppose you have a 3 tool job and decide to use tool#1 as your "master". Then the TLO for tool #1 = 0.000 as it is the reference. Once this tool length is entered into the tool table and loaded (G43 H1), then you can touch off on the part using this tool and zero the work coordinate axes.

    Now the TLO for each additional too is referenced to the length of tool #1. So if tool # 2 is longer than tool #1 by 2 inches the TLO for tool #2 is 2.000. If it is shorter than tool #1 by 1 inch then the TLO would be -1.000.

    You can use anything for your reference or "master". It could be tool#3 or it could be the spindle nose, or it could be a probe length. It is not important what your reference is. The only thing that is important is that your TLO measurements are all taken from the same reference.

    BTW, you can use any tool to touch off on the part as long as the TLO for that tool is entered and active with G43 H# where # is the tool number.

  11. #11
    Join Date
    Mar 2017
    Posts
    926

    Re: Newbie Linuxcnc g code set up question

    Quote Originally Posted by 109jb View Post
    The "Tool length offset" (TLO) can be done numerous ways. The TLO that you enter into the tool table is dependent on what you choose to be your "master Height". I'll give an example

    Suppose you have a 3 tool job and decide to use tool#1 as your "master". Then the TLO for tool #1 = 0.000 as it is the reference. Once this tool length is entered into the tool table and loaded (G43 H1), then you can touch off on the part using this tool and zero the work coordinate axes.

    Now the TLO for each additional too is referenced to the length of tool #1. So if tool # 2 is longer than tool #1 by 2 inches the TLO for tool #2 is 2.000. If it is shorter than tool #1 by 1 inch then the TLO would be -1.000.

    You can use anything for your reference or "master". It could be tool#3 or it could be the spindle nose, or it could be a probe length. It is not important what your reference is. The only thing that is important is that your TLO measurements are all taken from the same reference.

    BTW, you can use any tool to touch off on the part as long as the TLO for that tool is entered and active with G43 H# where # is the tool number.
    Thanks. It seems a lot clearer looking at Linuxcnc options after reading your explanation.

    What about telling the machine where the work piece is in relation to the tool? For example, if I place the blank stock in the center of my table instead of at the machine's zero, how / where do I tell the software where to start working and where the edges of the blank stock are?

    Until I can source and install some kind of probe, I'll be doing that part manually....

  12. #12
    Join Date
    Jan 2005
    Posts
    1943

    Re: Newbie Linuxcnc g code set up question

    What about telling the machine where the work piece is in relation to the tool? For example, if I place the blank stock in the center of my table instead of at the machine's zero, how / where do I tell the software where to start working and where the edges of the blank stock are?
    On linuxCNC there is the G53 machine coordinate system (MCS), and there are also 9 work coordinate systems (WCS), G54, G55, G56, G57, G58, G59, G59.1, G59.2, G59.3. Each of these is an offset from the MCS. So it is offset in X, Y and Z. You are setting the offset when you do a "Touch off"

    If you are using the Axis interface in LinuxCNC, then on the jog page is where you set the offset by using the "touch off" button. Move to the point you want to be zero in any axis and the make sure the axis is active (black dot), and then press "touch off". Whichever axis is current (depicted by the black dot in front of X Y or z) will be "touched off. If touching off Z, you are setting the offset for the WCS shown in the popup (G54-G59.3)

    The 9 WCS's can be used in one program. For example, if you 3 vises on your table you can run 3 parts at the same time by assigning the location of the parts in each vise to a different WCS.

    All of this is described in pretty good detail in the manuals.

    Documents

  13. #13
    Join Date
    Mar 2017
    Posts
    926

    Re: Newbie Linuxcnc g code set up question

    Quote Originally Posted by 109jb View Post
    On linuxCNC there is the G53 machine coordinate system (MCS), and there are also 9 work coordinate systems (WCS), G54, G55, G56, G57, G58, G59, G59.1, G59.2, G59.3. Each of these is an offset from the MCS. So it is offset in X, Y and Z. You are setting the offset when you do a "Touch off"

    If you are using the Axis interface in LinuxCNC, then on the jog page is where you set the offset by using the "touch off" button. Move to the point you want to be zero in any axis and the make sure the axis is active (black dot), and then press "touch off". Whichever axis is current (depicted by the black dot in front of X Y or z) will be "touched off. If touching off Z, you are setting the offset for the WCS shown in the popup (G54-G59.3)

    The 9 WCS's can be used in one program. For example, if you 3 vises on your table you can run 3 parts at the same time by assigning the location of the parts in each vise to a different WCS.

    All of this is described in pretty good detail in the manuals.

    Documents
    When I click on touch off button, it allows me to input a number of mm (or inches) but it doesn't state what I am meant to be measuring. I.e. Is it the number of mm from the edge of the end mill to the edge of the work piece, or something else.

    I am sure this is super basic for you guys but it's not particularly intuitive to a newbie like me... if I am told to input an "off-set", I need to know what is being offset and where to measure from...

  14. #14
    Join Date
    Jan 2005
    Posts
    1943

    Re: Newbie Linuxcnc g code set up question

    It is what you want that position to be. For example, you may be using an edge finder with a 0.2" diameter to find the X and Y edges of a part. When you locate the edge using it, it means the center of the spindle is 0.1" (0.2/2) away from that edge.

    So, for example if you located the edge in the X direction like above, you hit the "Touch off" button and enter 0.1, or -0.1, as the case may be, and that will set that as the current value of the X-axis for that WCS. Usually you would enter -0.1 see the picture for an explanation
    Attached Thumbnails Attached Thumbnails Untitled.png  

Similar Threads

  1. Newbie Question Regarding SolidCam G-Code Files & Bridgeport EzTrak
    By Mysterion in forum SolidCAM for SolidWorks and SolidCAM for Inventor
    Replies: 0
    Last Post: 01-30-2017, 04:27 PM
  2. Replies: 6
    Last Post: 03-06-2012, 04:14 PM
  3. Replies: 6
    Last Post: 12-18-2009, 04:36 AM
  4. G code newbie question
    By Steve Crum in forum G-Code Programing
    Replies: 1
    Last Post: 06-14-2008, 12:49 PM
  5. Question about code line from CAM newbie
    By BSF in forum G-Code Programing
    Replies: 19
    Last Post: 01-30-2008, 01:37 PM

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
  •