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:

5X post_clamp unclamp question


gcode
 Share

Recommended Posts

punclamp #Unclamp the rotary axis

if use_clamp & not(opcode$ = three | cuttype <> zero),

[

if p_inc, p_lock = zero

if s_inc, s_lock = zero

pbld, n$, s_slock, e$

pbld, n$, s_plock, e$

]

 

pclamp #Clamp the rotary axis

if use_clamp & not(opcode$ = three | cuttype <> zero),

[

if p_inc, p_lock = one

if s_inc, s_lock = one

pbld, n$, s_slock, e$

pbld, n$, s_plock, e$

]

This stock unmodified code from the gen5X post

It is the logic that decides when to clamp

and unclamp the rotary axis.

It works correctly for 3+2 positional moves

(unclamps, rotates and clamps), but for full rotary toolpaths (5X swarf and 5x curve) it's not right.

It should be unclamping and staying unclamped.

It doesn't do anything.

Can anyone give me a hand with this

Link to comment
Share on other sites

I think opcode$ = 17 is the op code for full rotary 5 axis toolpaths.

 

Do a search for clamp or unclamp. I think Paul Decelles helped Dave (from AU) configure his a while back. I was also chiming in on that thread, but Paul schooled me on how to do it correctly.

 

I think you need to include another "Or" condition somewhere

 

not(opcode$ = three | cuttype <> zero | opcode$ = 17),

 

Something like that...

Link to comment
Share on other sites

For Unclamp I use this

code:

      if use_clamp & cuttype <> zero,

[

p_lock = zero

s_lock = zero

pbld, n$, s_slock, e$

pbld, n$, s_plock, e$

]

For clamping I use this

code:

      if use_clamp & not(cuttype <> zero),

[

p_lock = one

s_lock = one

pbld, n$, s_slock, e$

pbld, n$, s_plock, e$

]

These calls are in several sections of the post, ie this whole block, not just "pclamp" or "punclamp"

 

Its a good idea to put them in your null toolchange area also...in case you go from 3+2 mode to full 5 axis without a toolchange.

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