587,683 active members*
2,733 visitors online*
Register for free
Login
Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2011
    Posts
    152

    Changing post g-code for helical arcs

    I am trying to figure out how to change my post so that it will do a different G-code for helical movements (g12/13). I do not see in the post anything that differentiates between arcs and helical arcs other than turning helical on or off in one section.

    Richard

  2. #2
    Join Date
    Oct 2013
    Posts
    153

    Re: Changing post g-code for helical arcs

    You mean you can't do helical moves using G02 and G03 ?

  3. #3
    Join Date
    Jun 2011
    Posts
    152

    Re: Changing post g-code for helical arcs

    Quote Originally Posted by imachining-6061 View Post
    You mean you can't do helical moves using G02 and G03 ?
    That is correct....

    I think I might have it figured but I haven't tested it yet...

    here is my @arc section...

    @arc
    if arc_plane_h eq xy and change(zpos) then
    call @helical
    exit
    else
    if arc_direction eq CCW then
    gcode = 3
    else ; CW
    gcode = 2
    endif
    endif

    {nb, ["G"gcode]}

    if arc_plane_h eq XY then
    ; X__Y__I__J__
    {[" X"xpos], [" Y"ypos], " I"xcenter, " J"ycenter}
    elseif arc_plane_h eq ZX then
    ; X__Z__I__K__
    {[" X"xpos], [" Z"zpos], [" I"xcenter], " K"zcenter}
    elseif arc_plane_h eq YZ then
    ;Y__Z__J__K__
    {[" Y"ypos], [" Z"zpos], [" J"ycenter], " K"zcenter}
    endif


    {[" F"feed]}
    endp



    And I created a section called @helical

    @helical
    if arc_direction eq CCW then
    gcode = 13
    else ; CW
    gcode = 12
    endif
    {nb, "G01", " R"radius, " I"xcenter, " J"ycenter, " A"start_angle, " Z"zstart}
    {nb, "G"gcode, " A"arc_size, " Z"(zpos-zstart), " F"feed}
    endp


    No Idea if it will work yet. I was starting to create a part to look at the code when I ran out of time.

    Richard

    EDT: I updated the code snippets with ones that will not error out in solidcam. I still have not ran this through my machine as I am working on the machine right now (changing out the hard drive to back it up).

  4. #4
    Join Date
    Jun 2011
    Posts
    152

    Re: Changing post g-code for helical arcs

    Because the helical interpolation uses 2 g-codes I would like to figure out how to add a variable to indicate if I need to be in rapid or linear.

    The programming manual seems to indicate that it requires 2 lines of code.
    1 - Position to the start point of the helix in POLAR Coords
    G0(G1)R_I_J_A_ (this is where I need to see if I am currently in G0 or G1)
    2 - Do the helix
    G12(G13)A_Z_F_ (where A is the total number of degrees and Z is the depth)

    So in each call I would need track 2 g-codes; G0/G1 for rapid or not to start point, and G12/G13 for CW/CCW. Normally you just use the "gcode = X" format but I can not do that with both in the same function.



    How do I initialize an additional variable?



    Richard

Similar Threads

  1. Dolphin/Mach3 Reversed Arcs in Front Post/G-code question
    By DICKEYBIRD in forum Dolphin CAD/CAM
    Replies: 7
    Last Post: 01-02-2015, 12:24 PM
  2. Tolerance and G-Code Arcs
    By Graphicman in forum ArtCam Pro
    Replies: 5
    Last Post: 12-11-2014, 04:02 AM
  3. Fagor 8055 Mill Sample Code and Helical Interpolation
    By sailcam in forum G-Code Programing
    Replies: 3
    Last Post: 10-12-2006, 12:37 PM
  4. Soweebee looking for helical code for heidenhain tnc351
    By soweebee in forum MetalWork Discussion
    Replies: 0
    Last Post: 06-09-2006, 06:50 PM
  5. Code with Vertical Arcs, and 3 axis travel help
    By GTmike400 in forum G-Code Programing
    Replies: 8
    Last Post: 04-21-2006, 11:06 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
  •