Hello Guest it is November 29, 2021, 09:45:07 AM

Author Topic: G74 for turning not recognized in Mach3.  (Read 2857 times)

0 Members and 1 Guest are viewing this topic.

G74 for turning not recognized in Mach3.
« on: April 27, 2011, 05:07:35 AM »
Hello,

I am struggling with my postprocessor to do some turning with Mach3.
I have generated a g-code with Solidcam and there is the G74 code. Mach3 does not accept this.

I do not understand the G81 code and I think that this is intended for drilling on the mill, not for drilling while turning.
This is the part in my .gpp file for turning;

@turn_drill
        local string for for1 for2  for3
        for1 = '2/2.0(P)'
        for2 = '2/2.0(P*10)'
        for3 = '5.0(P*1000)'

    local numeric save_feed xc_new
    gcode = 74
    if drill_type eq drilling then
        r = 0
        q = abs(drill_lower_z + r)
    endif
    if drill_type eq peck then
        r = r
        q = (down_step)
    endif
    if drill_type <> tapping
        {nb 'G'gcode, ' R'r }
        {nb 'G'gcode, ' Z'drill_lower_z ' Q'q:for3}
        if drill_type eq peck then
               {' R0.'}
        endif
        if feed_unit eq css
            {' F'feed }
        else
            {' F'feed:'5.0(p)' }
        endif
    else
        gcode = 32
        save_feed =feed
        xc_new = 100-p_feed
        feed = feed*xc_new/100
        { nb 'G'gcode ' Z'drill_lower_z}
        if feed_unit eq css
            {' F'feed }
        else
            {' F'feed:'5.0(p)' }
        endif
        ;tbd.. check for a maximum of 10 mm mistake (BIG MISTAKE)
        ;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
        feed = save_feed
        {nb 'M5'}
        {nb 'G'gcode ' Z'drill_upper_z ' S'(spin*1.3):integer_def_f  ' M4'}
        if feed_unit eq css
            {' F'feed }
        else
            {' F'feed:'5.0(p)' }
        endif
    endif
endp

Someone has been working at this, see the comment.

Can G81 be used for turning?
Any ideas how to solve this?? Please??

Jos Raven
Holland

Offline RICH

*
  • *
  •  7,419 7,419
    • View Profile
Re: G74 for turning not recognized in Mach3.
« Reply #1 on: April 27, 2011, 08:40:29 PM »
Here is a link to peck drilling cycles for the lathe.
http://www.machsupport.com/forum/index.php/topic,15205.msg101682.html#msg101682

RICH
Re: G74 for turning not recognized in Mach3.
« Reply #2 on: April 28, 2011, 02:28:42 AM »

Thank you Rich,

This is something I can use.
A peck drill on the lathe would be nice.

Regards,

Jos