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:

Add G0 first line after G41


Recommended Posts

I know it sounds dangerous but that is the way Traub have done it. There is no movement in the G0 line. It just somehow tell the machine how to position for the next cut. And you also need to use "control" compensation instead of "wear" that I normally use. Traub has it's own special way of treating G41 and G42. They also have G46 for turning which handles offset without needing to tell which side you turn on. That information is fetched from the tool quadrant setting.

Link to comment
Share on other sites

Finally I remembered to get some code from work!

This is roughly the way I get it from Mastercam and the way that seems "normal" for most machine types:

G0 X27.569 Y18.13 Z2.
G1 Z-6.5 F250.
G41 X23.6025 Y16.005
X23.8385 Y15.565
 

and this is the way that the Traub machines wants it to be. I have no idea how the control system designers 
heads are working. The G0 after G41 is not a rapid move. It just needs to be there. I also need to have 
control compensation type instead of wear. Do you think this is strange? Me too.. but it is the way it is.

G0 X27.569 Y18.13 Z2.
G1 Z-6.5 F250
G41
G0 X23.6025 Y16.005
G1X23.8385 Y15.565
 

Basically, what I need, is a way to find out if the G41 is being posted so I can post out the G0 the way I want.
If I remember correctly I have tried to check if cc_pos$ = prv_cc_pos$ but it didn't work. It is a while ago so 
I don't remember the details.

     Best regards, Mats

Link to comment
Share on other sites
plinout         #Output to NC of linear movement - feed

       if cc_pos$ <> prv_cc_pos$ & cc_pos$ <> zero,
	   [pccdia, e$
	   pcan1, pbld, sgfeed, sgplane, "G0", sgabsinc, pwcs, 
        pxout, pyout, pzout, pcout, strcantext, pscool, e$]
     else,[
       pcan1, pbld, sgfeed, sgplane, *sgcode, sgabsinc, pwcs, pccdia,
        pxout, pyout, pzout, pcout, feed, strcantext, pscool, e$]

This got it outputting mostly what you want, changing the `sgcode to *sgcode forces it to output G1/G0 every line tho, without changing it, bad things happened.

Link to comment
Share on other sites

Thanks a lot for your answer. I think I got it right now. This is what I did:

      if cc_pos$ <> prv_cc_pos$ & cc_pos$ <> zero,
      [
        pcan1, pbld, n$,psccomp, e$
        pcan1, pbld, n$, pg949596, pexct, "G0", pxout,
        pyout, pzout, pcout, pfr, pscool, strcantext, e$
        forced_G0 = 1
      ]
      else, 
      [
        pcan1, pbld, n$, pg949596, pexct
        if forced_G0 = 1, 
        [
          pfsgcode
          forced_G0 = 0
        ] 
        else,
        [
          psgcode
        ]
        psccomp, pxout, pyout, pzout, pcout, pfr, pscool, strcantext, e$
      ]

I added a variable called forced_G0 and set it to 1 if a G41 or G42 was output with the G0 line. Then I reset it the next time a line is output. I also added the
postblock pfsgcode to force the G1 output. Normally the psgcode is used. Now a bit of testing is required. 

Thanks for all your help!

Mats

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