584,798 active members*
4,373 visitors online*
Register for free
Login
Results 1 to 6 of 6
  1. #1
    Join Date
    Feb 2015
    Posts
    3

    Smile How to transform a G code into a XYZ position?

    Hello friends!

    I am having some trouble and I am sure you guys can help me. I need to transform a G code in a XYZ position. I am using Altair Hypermesh to simulate a stamping process. I am using a CAM software to generate the tool's tragetory on G code but I need to transfor G code into XYZ positiom so Hypermesh can understand the path tool need to follow.


    For exemplo


    I have a G code like this:


    S8000 M3 M43
    G0 X261.607 Y238.825
    G43 Z5.0 W0.0 H00 M8
    G94 G1 X251.367 Y251.119 Z-5.0 B0.0 F800.0
    G17 G3 X248.913 Y251.393 R1.767
    X248.581 Y248.947 R1.767
    X250.023 Y248.232 R1.769
    X253.842 Y251.908 R3.767
    X250.205 Y255.764 R3.767
    X244.238 Y250.241 R5.767
    X249.724 Y244.239 R5.767
    X250.547 Y244.245 R8.472

    and I need to have a XYZ position like that:




    t x y z
    0.006 -39.1422359731 -74.0404497176 0.04
    0.009 -25.6389770165 -79.7292022342 0.04
    0.012 -9.2789593029 -83.2346306871 0.04
    0.015 7.5053535083 -83.4132633343 0.04
    0.018 24.9806024949 -79.9379279838 0.04
    0.021 39.7506629673 -73.7155860386 0.04
    0.024 51.2709784039 -66.222274235 0.04
    0.027 63.844394138 -54.2032855877 0.04
    0.033 80.0233623289 -24.7055522692 0.04
    0.036 83.3545522634 -8.1315095973 0.04
    0.039 83.2917282148 8.7516194127 0.04
    0.042 79.6309342907 25.9425737995 0.04
    0.045 73.2164700281 40.6626529875 0.04
    0.048 63.0382654284 55.1387334198 0.04
    0.051 53.1713724693 64.7063210288 0.04
    0.054 41.3274655886 72.8432798505 0.04


    Do you guys some settings or programs that can do this?


    Thank you so much!

  2. #2
    Join Date
    Oct 2010
    Posts
    1189

    Re: How to transform a G code into a XYZ position?

    if you know python or similar writ ran converter would be fastest to do so

  3. #3
    Join Date
    Feb 2015
    Posts
    3

    Re: How to transform a G code into a XYZ position?

    Quote Originally Posted by Tkamsker View Post
    if you know python or similar writ ran converter would be fastest to do so
    Hello friend! Could you explain your idea to me?

    thank you

  4. #4
    Join Date
    Oct 2010
    Posts
    1189

    Re: How to transform a G code into a XYZ position?

    yes write a lttlle Python ( there are a lot of examples ) or any other programming language you like
    software which reads your g code file
    and produces the file you need if you have an experienced basic programmer probably an access macro could also do the trick
    thomas

  5. #5
    Join Date
    Oct 2006
    Posts
    5
    Just open the post processor on the cam software and remove all the parts of the GCode you don't want.
    Like spindle speeds and drive letter assignments (xyz)

    The GCode you provided is several arcs, you will only get the end value of the arc if you remove the R value in the post processor.

    Honestly you would be better off leaving the GCode alone and getting your project to read GCode.

  6. #6
    Join Date
    Oct 2010
    Posts
    1189

    Re: How to transform a G code into a XYZ position?

    Rusty thats what i meant ..

Similar Threads

  1. G-code array/transform without CAM
    By Physcie in forum G-Code Programing
    Replies: 4
    Last Post: 11-13-2019, 10:07 PM
  2. SolidCam; Transform; How to transform operations for individual parts
    By Binze in forum SolidCAM for SolidWorks and SolidCAM for Inventor
    Replies: 12
    Last Post: 11-05-2014, 11:22 AM
  3. Aspan 7.2 G Code to include vacuum hood down and up position
    By najatra in forum Employment Opportunity
    Replies: 0
    Last Post: 10-14-2013, 12:36 AM
  4. Code moving to z position before xy
    By richiegore in forum MadCAM
    Replies: 3
    Last Post: 12-16-2010, 05:07 PM
  5. DYNAPATH 20, WHEN E-CODE IS ENTERED, POSITION DISPLAY DOES NOT UPDATE.
    By WEBBERS_14 in forum Uncategorised MetalWorking Machines
    Replies: 0
    Last Post: 08-28-2008, 04:09 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
  •