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:

Table clamp post help please


McLaren
 Share

Recommended Posts

Good morning everyone, I was hoping someone could help me out with some post issues I am having. I am trying to get clamp/unclamp code to work correctly and this is what I have so far:

code:

psof            #Start of file for non-zero tool number             

pcuttype

toolchng = one

if ntools = one,

~~~~~~~~~~~~~~~~~~~~~

pbld, n, "G0G40G80G90G49Z0", *speed, e

if stagetool >= zero, pbld, n, *t, "M206", ptoolcomment, e

comment

if rot_on_x & cuttype = zero, pbld, n, *sunlock, e

pindex

if rot_on_x & cuttype = zero, pbld, n, *slock, e

if mi1 > one, absinc = zero

pcan1, pbld, n, *sgcode, pwcs, pfxout, pfyout,

~~~~~~~~~~~~~~~~~~~~~

~~~~~~~~~~~~~~~~~~~~~

ptlchg0 #Call from NCI null tool change (tool number repeats)

pcuttype

pcom_moveb

~~~~~~~~~~~~~~~~~~~~~

if rot_on_x & cuttype = 0, pbld, n, *sunlock, e

if cuttype = zero, ppos_cax_lin

if rot_on_x & cuttype = 0, pbld, n, *slock, e

~~~~~~~~~~~~~~~~~~~~~

The problem I am having is that it puts the clamp/unclamp at every null tool change(ie g80) even when there is no pallet rotation. Example:

code:

G98G81R.1Z-.13F10.

Y.593

X-2.Y2.

X-3.625

G80

(CLEARANCE MOVE B270)

M79

M78

X-2.Z5.

(CLEARANCE MOVE B0)

G54X-6.Y2.

Z5.

M79

B0

M78

(C'DRILL C'BORES B0)

M79

M78

X-10.625Y3.625Z.1

G98G81R.1Z-.31F10.

Y.375

G80

(C'DRILL 1/8NPT B0)

M79

M78

X-10.Y2.

Thank you in advance for any and all replies.

Link to comment
Share on other sites

Ok, I have no idea what I'm doing, but it seems to have worked. Under #Rotary/Index variables I added this:

code:

clampstate  : 0     #Pallet change switch

And then under #General G and M Code String select tables I added this:

code:

# Table lock and unlock codes

sclamp M78 #Pallet clamp

sunclamp M79 #Pallet unclamp

And finally under ptlchg0 I added this:

code:

      if indx_out <> prv_indx_out,

[

clampstate = 1

*sunclamp, e

]

if cuttype = zero, ppos_cax_lin

if indx_out = prv_indx_out & clampstate = 1,

[

clampstate = 0

*sclamp, e

]

It seems to have worked, and I only barely understand why!

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