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:

OKUMA - POST


Lathe-Mill
 Share

Recommended Posts

You should have something like this in your post:

 

 

pcanceldc #Cancel canned drill cycle

result = newfs (three, zinc)

z = initht

if cuttype = one, prv_zia = initht + (rotdia/two)

else, prv_zia = initht

pxyzcout

!zabs, !zinc

prv_gcode = zero

pcan

pcan1, pbld, "G80", strcantext, e

pcan2

 

If you want to cancel after every hole,then I'm stumped!

Link to comment
Share on other sites

Carlos

 

If you're using MPOKUMA I edited mine to look like this:

 

pg80_out #Cancel canned drill cycle

result = newfs (three, zinc)

result = newfs (15, feed)

z = initht

if cuttype = one, prv_zia = initht + (rotdia/two)

else, prv_zia = initht

if initht > refht, ret_ht = initht

else, ret_ht = refht

pxyzcout

!zabs, !zinc

prv_gcode = zero

pbld, n, "G00", *ret_ht, e

g80_out = zero

 

I used 'G00' instead of 'G80' because G80 stops the spindle in my Okumas [which I hate]

 

C

Link to comment
Share on other sites

ok, here it is

 

pcanceldc #Cancel canned drill cycle

#G80 Must Appear in SUB program before RTS

#if g80_out = 1, pg80_out

 

pg80_out #Cancel canned drill cycle

result = newfs (three, zinc)

result = newfs (15, feed)

z = initht

if cuttype = one, prv_zia = initht + (rotdia/two)

else, prv_zia = initht

pxyzcout

!zabs, !zinc

prv_gcode = zero

pbld, n, "G80", e

g80_out = zero

Link to comment
Share on other sites

quote:

REASON:

when i have a drill or tap cycle, and using diferent depths, it moves X and Y then Z

tool breaks, or if i use an endmill to drill and then move for a milling op, same thing

so i want to cancel with a g80 or g0

This sounds more like a Mastercam prob than a post problem; if you have a safe clearance height set in your ops and nobrk set to 'no' in your post your machine should move safely from one hole or operation to another...

 

C

Link to comment
Share on other sites

here is a example

 

NT26 G0 G90 G15 H1 X0. Y.67 S3500 M3

N33 G56 H26 Z.25 T27 M8

N34 G81 Z-.035 R.1 F10. M53

N35 X.4738 Y.4738

N36 X.67 Y0.

N37 X.4738 Y-.4738

N38 X0. Y-.67

N39 X-.4738 Y-.4738

N40 X-.67 Y0.

N41 X-.4738 Y.4738

( SPOT 2 PLC. )

N42 X-.375 Y-1.3132 Z.25------->>>

N43 G81 Z-3.739 R-3.604 F10. M53

N44 X.375

N45 M9

N46 G0 Z40.

Link to comment
Share on other sites

Something appears to be missing there. M53 is "return to initial Z position after hole machining", but for that to work, there needs to be the "Initial Z Plane" line, which would look something like this:

 

G71 Z40

 

between N33 and N34. There shouldn't be any need for the breakup of the drilling into two cycles (the two G81 lines) when all that is different is the Z depth and the R height.

Link to comment
Share on other sites

Mick

 

I have a copy of Carlos' post from awhile back and it has been modified extensively [in somewhat unusual ways] in the drilling area so the G71 line is actually hard coded in the beginning of the program (since G71 is modal you can just call the M53 later on as many times as you wish) instead of being posted as needed. The post has a lot of hardcode in it that shouldn't really be there, but, if it works....

 

 

In this case, I think his problem was the # in this area:

 

pcanceldc #Cancel canned drill cycle

#G80 Must Appear in SUB program before RTS

======> #if g80_out = 1, pg80_out

 

With that removed, all should be fine

 

C

Link to comment
Share on other sites

Chris, got your e-mail, thanx alot man, it does work fine. about that G71, it sux when I', doing rotary work, i inherited that post, I try to tweek it as i go.

as you can see that g71 is set at z.25, and that is on all 4 axis, so when i program the rotary that line comes G71 z.25 always, althou i work from centerline of the part, so manually i need to change it to what ever i need to.

thnx

Link to comment
Share on other sites

Carlos, in your post someone commented out the line that generates the G71 line where it is really supposed to be. You should try it the way it was originally set up and see what you think:

 

1) Comment out the G71 Z.25 hardcode line

 

2) Remove the pound sign from this line in pdrlcommonb:

 

# pbld, "G71", *initht, e

 

This should tidy things up, I think, but take a close look at the code because there are some funky variables and other things going on in your post that could possibly be affected by this

 

I'm looking into the other question you emailed me

 

C

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