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:

Misc Integer help


Recommended Posts

Hi Guys.

 

I have an Okuma Vtl twin spindle post. All we do in this machine is turn impellers from castings(Stainless, and Iron). When the operator gets done roughing, he wants me to park the tool and open the door so he can check the inserts.It looks like this:

 

N500 G1 Z-1.0379

N505 X5.8676 Z-1.0079

N510 G0 Z10.

N515 G0 X30. Z20. M9

N520 M102

N525 M5 G4F5.

N530 M91

N535 M0

(*********PROGRAM STOP TO CHECK INSERT******)

(*******FINISH FORM SHROUD*********)

N540 M90

NT4000

N545 G0 T0121

N550 G50 S585

N555 G96 S400 M4

N560 M8 M101

 

 

Also, we park the tool on centerline to check the thickness of the shroud. It looks like this:

 

N165 G0 Z10.

N170 G0 X30. Z20. M9

N175 M09 M102

N180 M5 G4F5

N185 M91

N190 M0

(***** CHECK INSERT *****)

N195 M90

NT1000

( ********TOUCH OFF CENTERLINE OF PIECE*********)

N200 G0 X30. Z20. M4 S200

N205 G0 T0101

N210 G0 X12.4 Z2.

N215 G0 Z-3.

N220 M5 G4 F5.

N225 M91

N230 M0

(***** CHECK THE LOCATION OF THE TOOL EDGE WITH)

( THE CENTERLINE OF THE PIECE. *****)

(***** RESET 'Z' IF NESSECARY AS PER THE SET-UP)

N235 M90

N245 T0121

N250 G0 X12.4 Z-2.4063

N255 M91

N260 M0

(ADJUST OFFSET #21 TO MAINTAIN SHROUD THICKNESS.)

(ADJUST ONLY IF SHROUD WILL BE THIN.)

(ROUGH FORM SHROUD)

N265 M90

N270 T0121

N275 G50 S585

N280 G96 S350 M4

N285 M8 M101

 

 

 

 

Can anyone help me to put a misc. Integer to make the retract to what I need for above. Also, can you help me to make a misc. Integer to check centerline.

 

I have tried, but I can't get it to work.

 

Thanks guys,

 

Todd

Link to comment
Share on other sites

What post are you using to run this machine?

 

Also, please clarify as to exactly which lines of code need to be added to differentiate the new code from what the post is already producing.

 

I'm assuming that when checking the shroud thickness the coordinates are going to vary from part to part. Are you going to edit the values after posting or are you wanting the values setup as misc reals?

 

When setting the misc values, are you wanting the insert check/shroud check to appear after the operation the value is set (ie around the retract) or before the operation? Will this only apply when changing tools or also in between operations with the same tool?

Link to comment
Share on other sites

Chris,

 

We are using an Okuma VTL mill/turn post. We purchased it thru "Optipro" our Reseller.

As for the Code I am looking for, right now, the post kicks out this:

 

G0 Z10. <---Retract Z

G0 X30. Z26. <---Go Home Command

M09 M102 <----High Pressure Coolant off

M5 <----Spindle off

M1 <----Option Stop

 

 

What I'd like is to have the option thru Misc. Integer to kick out this:

G0 Z10.

G0 X30. Z26.

M09 M102

M5

M91 <---Door open

M0<---Program Stop

( *******CHECK INSERTS **********) <---these comments are constants

M90 <-----Door Closed

NT2000<-----Start up Block

 

 

or this:

 

 

G0 Z10.0

G0 X30. Z26. M9

M09 M102

M5

M1

( ********TOUCH OFF CENTERLINE OF PIECE*********) <---these comments are constants

NT2000

G0 X30. Z26. M4 S200

G0 T0101

G0 X11.4 Z2.<---this X could be *mr2$

G0 Z-2.1875 <---this Z could be *mr3$

M5

M91

M0

(CHECK THE LOCATION OF THE TOOL EDGE WITH) <-----these comments are constants

(THE CENTERLINE PIECE.) <----these comments are constants

(RESET 'Z' IF NECESSARY AS PER SET-UP INFO) <----these comments are constants

M90

T0121

G0 X11.4 Z-1.75<----this Z could be *mr4$

M91

M0

(ADJUST OFFSET #21 TO MAINTAIN SHROUD THICKNESS.) <---these comments are constants

(ADJUST ONLY IF SHROUD WILL BE THIN.) <----these comments are constants

 

 

As far as the Shroud thickness, it does vary from part to part and yes I would like to set the Misc. Reals for this. I will add a point to the geometry for the shroud thickness that the programmers can pick.

 

I would like it to be a retract option. You know, like:

 

if mi4$ = 0, retract1 <----normal retract with option stop

else,

if mi4$ = 1, retract1a<----retract to check insert

else,

if mi4$ = 2, retract 1b<---retract to centerline of part to check thickness/shroud thickness.

 

something to that effect.

Thanks Chris

Link to comment
Share on other sites

With out seeing the post, here is the basic code that needs to be applied:

 

#declare variables
nt    : 0
last_mi4 : 0
last_mr2 : 0
last_mr3 : 0
last_mr4 : 0

#format variables - 2 is the default format for coordinates, 4 for integers
fmt X 2 mr2$
fmt Z 2 mr3$
fmt Z 2 mr4$
fmt "NT" 4 nt

#Code - put this after the retract (likely pretract, pretract0 or ptoolend), I don't know where to put this without seeing your post.
if last_mi4, nt = nt + 1000
if last_mi4 = 1,
 [
 pbld, n$, "M91", e$
 pbld, n$, *sm00, e$
 pbld, n$, "( *******CHECK INSERTS **********)"
 pbld, n$, "M90", e$
 pbld, n$, *nt, e$
 ]
if last_mi4 = 2,
 [
 pbld, n$, "( ********TOUCH OFF CENTERLINE OF PIECE*********)", e$
 pbld, n$, *nt, e$
 pbld, n$, *sg00, *x_home, *z_home, "M4", "S200", e$
 pbld, n$, *sg00, "T0101", e$
 pbld, n$, *sg00, *last_mr2, "Z2.", e$
 pbld, n$, *sg00, *last_mr3, e$
 pbld, n$, *sm05, e$
 pbld, n$, "M91", e$
 pbld, n$, *sm00, e$
 pbld, n$, "(CHECK THE LOCATION OF THE TOOL EDGE WITH)", e$
 pbld, n$, "(THE CENTERLINE PIECE.)", e$
 pbld, n$, "(RESET 'Z' IF NECESSARY AS PER SET-UP INFO)", e$
 pbld, n$, "M90", e$
 pbld, n$, "T0121", e$
 pbld, n$, *sg00, *last_mr2, *last_mr4, e$
 pbld, n$, "M91", e$
 pbld, n$, *sm00, e$
 pbld, n$, "(ADJUST OFFSET #21 TO MAINTAIN SHROUD THICKNESS.)"
 pbld, n$, "(ADJUST ONLY IF SHROUD WILL BE THIN.)", e$
 ]

#update values in plast post block
plast
 last_mi4 = mi4$
 last_mr2 = mr2$
 last_mr3 = mr3$
 last_mr4 = mr4$

 

If you bought the post, why not go back to your reseller for edits??

Link to comment
Share on other sites

Chris,

Thank you I will try it and repost. 2 reasons why

I don't go to the reseller.

 

1. They are already working on one post that is completely wrong, so I don't have time to wait.

2. I am trying to learn to do these things on my own, I have done this stuff before with the old Version 8 and 9 posts. But since "x" I struggle a little because it seams there are more variables in the post now than before.

 

Todd

 

 

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