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:

Help with G28 output.


Recommended Posts

This really depends on the post that you are using. Some posts will have a misc value that you can set that will turn off the ref return for each individual operation.

 

For a more permanent solution in the post, you can search for the pretract post block. Generally the line outputting these reference returns are found here and are output using an sg28ref variable like this:

 

pbld, n$, sgabsinc, sgcode, *sg28ref, "Z0.", scoolant, e$

 

To disable the retract except for at the end of file you would add a condition to output only when nextop$ = 1003, like this:

if nextop$ = 1003, pbld, n$, sgabsinc, sgcode, *sg28ref, "Z0.", scoolant, e$

 

You should also add an else statement to handle the output of coolant to be thorough:

if nextop$ = 1003, pbld, n$, sgabsinc, sgcode, *sg28ref, "Z0.", scoolant, e$

else, pbld, n$, scoolant, e$

Link to comment
Share on other sites
  • 2 years later...

Here ya go done for you

the only issue i have is it keeps it from adding M08 at any other tool change but the first havent fig that out yet. If i could find a way to keep M08 on all tool changes even if a M09 was never called you would be set.

 

 

 

 

Go to

 

pretract

 

 

 

find  the cc_pos is reset in the tool change copy and paste everything under it

  #cc_pos is reset in the toolchange here
    

  cc_pos$ = zero
      gcode$ = zero
      if use_rot_lock & rot_on_x,
        [
        if (index = one & (prv_indx_out <> fmtrnd(indx_out)) | (prv_cabs <> fmtrnd(cabs)))
          | nextop$ = 1003 | frc_cinit, prot_unlock
        ]
     if nextop$ = 1003,  pbld, n$, sccomp,*sm05, psub_end_mny, e$
      if convert_rpd$, pconvert_rpd
      if nextop$ = 1003, pbld, n$, scoolant, e$
      if nextop$ = 1003, pbld, n$, [if gcode$, sgfeed], sgabsinc, sgcode, *sg28ref, "Z0.", [if gcode$, feed], scoolant, e$
      if nextop$ = 1003 | tlchg_home, pbld, n$,"G90","G53", "X-12.", "Y0.", protretinc, e$
      else, pbld, n$, protretinc, e$
      if (subactv = zero & use_g52_shft & wrkofs_num = zero) | shft_flg = one,
        [
        n$, *sg52, "X0. Y0. Z0.", e$ #Cancel Work Shift
        shft_flg = zero
        ]
      absinc$ = sav_absinc
      coolant$ = sav_coolant
      uninhibit_probe$

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...