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:

Posting Redundant Arc Codes


john316
 Share

Recommended Posts

Kevin look here:

code:

parcijk         #Select the arc output

if arcoutput$ = zero | full_arc_flg$,

[

#Arc output for IJK

iout, jout, kout

!i$, !j$, !k$

]

else,

[

#Arc output for R

if abs(sweep$)<=arc180 | arcoutput$=one, result = nwadrs(srad, arcrad$)

else, result = nwadrs(srminus, arcrad$)

*arcrad$

]

I think if you change the ! to a * it will do the IJK for the G2 and G3 should be here:

code:

pcirout         #Output to NC of circular interpolation                                

sav_gcode = gcode$

parc_setup

pcan1, pbld, n$, `sgcode, sgplane, sgabsinc, `sgfeed, pccdia,

xout, yout, zout, p_out, s_out, parcijk, `feed, strcantext, scoolant, e$

gcode$ = sav_gcode

if nc_lout$ <> m_one & feed = zero, psfeederror

Change the ` on sgcode to * and that should take care of that one.

 

HTH

Link to comment
Share on other sites

It is the iout, jout and kout variables that need a * in front of them, i$, j$ and k$ should have a ! in front of them.

 

That will give you I, J and K in all arcs. If you only want the two relevant ones, you will need to alter the code a little more. You will then need to replace the iout, jout, kout line with these three lines:

 

code:

   if plane$ = 0, *iout, *jout

if plane$ = 1, *jout, *kout

if plane$ = 2, *iout, *kout

That still won't get you X and Y on all arcs in G17 etc. To get that you need a bit more editing. Replace the xout, yout, zout in the pcirout block with pcirxyz and make this postblock:

 

code:

pcirxyz

if plane$ = 0, *xout, *yout, zout

if plane$ = 1, xout, *yout, *zout

if plane$ = 2, *xout, yout, *zout

I hope that helps.

Link to comment
Share on other sites

.

 

Just now getting back to it.

 

What I've done so far is in pcirout forced the xyz and added a force for ijk to see how that would work. This machine uses a G22 and G23 for helical so I'm thinking of trying the xyzijk output with the G2,G3 changed to G22,G23 to see how the machine reacts. If it works okay I can get the helical without having to set it up in the post.

 

I don't like bypassing the post logic so I'll try the force on the parcijk, but I still need to force the xyz.

 

I like the idea of only outputting the pertinent code so I'm going to try working in that direction.

 

.

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