Jump to content

Welcome to eMastercam

Register now to participate in the forums, access the download area, buy Mastercam training materials, post processors and more. This message will be removed once you have signed in.

Use your display name or email address to sign in:

Drill cycle


Recommended Posts

in need of a modification to my Fagor post drill cycle. am clueless on posts so be gentle.

I need 98 G81 Z.1 I-.25 F30. (the i is drill depth for fagor what a freak)

current post code is

pdrill$          #Canned Drill Cycle
    
      pdrlcommonb
     pcan1, pbld, n$, *sgdrlref, *sgdrill, pdrlxy, prdrlout, pcout,
          "I",no_spc$, PFZOUT, [if dwell$, *dwell$], *feed, strcantext, e$
      #pcan1, pbld, n$, *sgdrlref,"CHANGE Z TO I" *sgdrill, pdrlxy, pZout, pcout, pindexdrl,
       # prdrlout, [if dwell$, *dwell$], *feed, strcantext, e$
      #pcom_movea

outputs this G98 G81 Z.1 IZ-.25 F30.    need that Z to go away.

TIA   Doug
  •  
Link to comment
Share on other sites
7 minutes ago, RaiderX said:
in need of a modification to my Fagor post drill cycle. am clueless on posts so be gentle.

I need 98 G81 Z.1 I-.25 F30. (the i is drill depth for fagor what a freak)

current post code is

pdrill$          #Canned Drill Cycle
    
      pdrlcommonb
     pcan1, pbld, n$, *sgdrlref, *sgdrill, pdrlxy, prdrlout, pcout,
          "I",no_spc$, PFZOUT, [if dwell$, *dwell$], *feed, strcantext, e$
      #pcan1, pbld, n$, *sgdrlref,"CHANGE Z TO I" *sgdrill, pdrlxy, pZout, pcout, pindexdrl,
       # prdrlout, [if dwell$, *dwell$], *feed, strcantext, e$
      #pcom_movea

outputs this G98 G81 Z.1 IZ-.25 F30.    need that Z to go away.

TIA   Doug
  •  

Need to make a variable for the I depth and define it like we do any variable we are going to use in MP.  Then you need to give it a format to use for posting. Then above this section you need to make pzout  equal to that variable. Replace pzout with the new varabile and should be good to go.  If you look on the Tech Exchange I think they have a Fagor Post and it might already have this worked out and would be easy to follow.

Don't worry Colin should be along soon and give a more detailed explanation.

Link to comment
Share on other sites

Thank you for the reply.

i am so post illiterate am afraid am going to need this spelled out. am getting  errors. syntax i am sure

PST LINE (2922) - The post block output type processing has failed!, , Label has not been defined[12]
21 Jan 2022 06:42:21 AM - PST LINE (2922) - The formula/boolean failed (general message), The formula/boolean does not terminate properly
21 Jan 2022 06:42:21 AM - RUN TIME -PST(2922)- The math calculation/formula has an error
Link to comment
Share on other sites
38 minutes ago, RaiderX said:

Thank you for the reply.

i am so post illiterate am afraid am going to need this spelled out. am getting  errors. syntax i am sure


PST LINE (2922) - The post block output type processing has failed!, , Label has not been defined[12]
21 Jan 2022 06:42:21 AM - PST LINE (2922) - The formula/boolean failed (general message), The formula/boolean does not terminate properly
21 Jan 2022 06:42:21 AM - RUN TIME -PST(2922)- The math calculation/formula has an error

Like I said I went and pulled a Fagor Post from the Tech exchange. They have use the result = nwards(stri, zabs) and result = nwards(stri, zinc) to change the format of the Z to I in the pdrlcommonb section of the post.

pdrlcommonb     #Canned Drill Cycle common call, before
      if sav_dgcode = 81,
        [
        result = newfs(two, zinc)
        if drillcyc$ = three, drlgsel = fsg1(-ss$) + drillcyc$ * two
        else, drlgsel = fsg2(dwell$) + drillcyc$ * two
        drillrefx = vsub(drl_init_x$, drl_ref_x$)
        if lng3(drillrefx) > vtol$, drillref = zero
        else, drillref = one
        prv_refht_a = c9k
        prv_refht_i = c9k
        prv_dwell$ = zero
        ]
      prv_zia = drl_init_z$
      x$ = vequ(drl_depth_x$)
      pcom_moveb
      feed = fr_pos$
      comment$
      pcan
      plane$ = drl_plane$
      result = nwadrs(stri, zabs)
      result = nwadrs(stri, zinc)
      if dwell$ <> 0, dwell$ = dwell$ * 100

      pbld, n$, sgabsinc, e$

Then when pdrill is called it formats the Z in the pdrlcommonb section so when any drill cycle is output in the Fagor Post it replaces the Z with I where needed. Download the Post from there and use it as a roadmap. It is for a router, but is still good for a Mill.

pdrill$          #Canned Drill Cycle
      pdrlcommonb
      pcan1, pbld, n$, sgplane, *sgdrill, *sgdrlref, prdrlrout,
        pfrdrlout, pcout, dwell$, *feed, strcantext, e$
      pcom_movea

 

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.

Join us!

eMastercam - your online source for all things Mastercam.

Together, we are the strongest Mastercam community on the web with over 56,000 members, and our online store offers a wide selection of training materials for all applications and skill levels.

Follow us

×
×
  • Create New...