585,919 active members*
4,150 visitors online*
Register for free
Login
Results 1 to 9 of 9
  1. #1
    Join Date
    Nov 2008
    Posts
    4

    Smile function of the Z axis

    Hi everybody, i'm new and i want to know this.
    I'm programing a cnc software for my cnc machine, this software is capable to read a cnc file (g-code) and move my machine, but i'm a little confuse how z should move.
    if i want to go to X100 Y250 Z50, Z is moving at the same time of the other axis or first go to X100 Y250 and then Z is going down to Z50.

    The other case would be X100 Y250 Z0, first go X100 Y250, Z doesnt move, and then X100 Y250 Z50 go to Z50. the code complete wolud be:

    X100 Y250 Z0 go ot 100,250
    X100 Y250 Z50 already in 100,250 move Z50

    My doubt is because sometimes i want to make a rect cut without moving the Z axis and sometimes, a circular cut moving the Z axis with the other axis.

    Thanks for your help.

  2. #2
    Join Date
    Jun 2008
    Posts
    1511
    If you do not want to axis to move do not put it in that line of code.

    X100Y25--this will move your X100 and Y250 at the same time
    Z50--This will move to the 50 once the previous block is complete

    Your example of the program
    X100Y250Z0-- this moves X100,Y250,Z0
    X0Y0Z50--now you will move X,Y back to 0 and Z 50 positive.

    I am not 100% on what you are trying to do.

    Stevo

  3. #3
    Join Date
    Mar 2003
    Posts
    35538
    Unless you're using incremental code, in which case

    X0 Y0 Z50 would only move the Z axis.
    Gerry

    UCCNC 2017 Screenset
    http://www.thecncwoodworker.com/2017.html

    Mach3 2010 Screenset
    http://www.thecncwoodworker.com/2010.html

    JointCAM - CNC Dovetails & Box Joints
    http://www.g-forcecnc.com/jointcam.html

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)

  4. #4
    Join Date
    Nov 2008
    Posts
    4
    Thanks Stevo1 for your answer.

    I'm tring to finish a software that im writing for my machine, reading your answer i'd found a mistake, in my code

    X100Y250Z0, the other part of code isnt X0 Y0 Z50, obviusly go to 0,0, the correct code is.

    X100Y250Z0
    X100Y250Z50

    If you analize the code, the firs part go to 100,250 and Z doesnt move, already in this point, after the first move, the second instruction move Z go to 50 and ends.

    What i exactly want to know is, if i write X100Y250Z50 my machine move the 3 axis at the same time, or first move X,Y and after Z "in the same instruction".

  5. #5
    Join Date
    Jun 2008
    Posts
    1511
    It will move all 3 axis at the same time. What kind of machine control are you writting this for? I am mainly familiar with Fanuc controls and they would need to have the simultaneous 3 axis control option in the control. This is an option that allows you to move 3 axis at the same time.

    To help shorten your code and not being so redundent you do not need the X,Y positioning in the second line. Once you have reached a distance in a axis it will not move again unless you program it to do so. So you can write
    X100Y250Z0
    Z50----------X,Y will stay put at X100, Y250.

    This also works for your modal commands so if you were to do rapid positioning you only need the G0 in the first line and any move after that will be rapid. Once you program a G1 feed move for example it will stay active in each line until another G0 is programmed.

    Stevo

  6. #6
    Join Date
    Nov 2008
    Posts
    4
    Ok Stevo.

    If i understand right, if i want my machine move to a X,Y position an then Z position, for example to do a drill this could be the code:

    N0001 X100Y250 first instruction
    N0002 Z50 second instruccion (obviusly the G-code is missing, and the others).

    But if i want to move the 3 axis at the same time, the code could be:
    N0001 X100Y250Z50 (for a milling)

    That's right?

  7. #7
    Join Date
    Jun 2008
    Posts
    1511
    Yes that is correct. I do move all 3 axes no matter if I am drilling or milling. This just saves time. This is also a safer way because you should always have a Z move when positioning the X,Y either before the line or in the same line. This will prevent if the tool is down in the part somewhere not cleared of clamps ect. and the program is started it will move its X,Y and wipe out the part or clamps. So I always program a Z-clearance in my first X,Y move. So if you wanted to drill a 25mm deep hole using the code that you have in absolute mode.

    G43H1Z100---instates tool height 1
    G0G90---rapid positioning, absolute mode
    X100Y250Z100M3---position over hole in X,Y with Z100 above the part, turn on spindle
    Z3----Z to 3mm above the part
    G1Z-25.F30M8—feed down 25mm turn on coolant set feed rate
    G0Z100---rapid out of the hole 100mm above the part
    M30---end program

    I have attached a document that walks through some steps of setting up a program for a simple part. I have it using work coordinates G54.

    Hope this helps.

    Stevo
    Attached Files Attached Files

  8. #8
    Join Date
    Nov 2008
    Posts
    4
    Stevo thank you for your time and your tips have been so instructive.

  9. #9
    Join Date
    Jun 2008
    Posts
    1511
    Your welcome. Feel free to ask questions if you need help.

    Best of luck.
    Stevo

Similar Threads

  1. TM3 need help with mirror function
    By hankster in forum Haas Mills
    Replies: 1
    Last Post: 10-22-2008, 10:50 PM
  2. Want to program a Z-Zero function...Help!
    By teamtexas in forum Mach Software (ArtSoft software)
    Replies: 8
    Last Post: 09-04-2008, 06:26 PM
  3. what is the G52 function
    By glovebox20 in forum Haas Mills
    Replies: 12
    Last Post: 04-25-2008, 04:07 AM
  4. Replies: 20
    Last Post: 03-11-2007, 09:31 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
  •