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:

lathe program stop then flip part


Columbo™
 Share

Recommended Posts

I have a part that is cut on an arbor. I remove .05 from the face and do some finish turning on the end where it gets faced. Then there is a program stop, and flip part. Is there a way to have the updated geometry get flipped compensating the .050. The way I do it now is using two machine groups and manually putting the programs together. This seems a little tedious. Is there a simple way?

 

Thanks smile.gif

 

cheers.gif

Link to comment
Share on other sites

Thanks Steve,

 

That was pretty cool. Just tried it and posted it. Output looks good except the post error. This is what I got.

 

( *** Post Customization REQUIRED! *** )

( STOCK FLIP -> MISC OPS. function was programmed ! )

N1840M00

 

 

Guess I gotta look at the post. Any idea where?

 

Thanks

 

smile.gifcheers.gif

Link to comment
Share on other sites

They are Okumas

 

I think if I just "#" out the error line all should be good. It doesn't seem to be linked to anything.

 

# ------------------------------------------------

# Misc. Ops. Postblock Section - comments only!

# ------------------------------------------------

toolend_flg : 1 #Flag to execute ptoolend sequence or not

 

| HERE

V

 

#smiscops_msg "( *** Post Customization REQUIRED! - for Misc Ops. Functions *** )"

 

 

Am I right???????

 

 

:cheers"

Link to comment
Share on other sites

This part of the post needs to be customized, as the sequence of code and the code itself varies so much from control to control there would be no way MC could put something together without alienating everyone that doesn't use it.

 

Example of a Myiano dual spindle dual turrent post transfer for the sub and the flip. Hopefully this helps some.

code:

# --------------------------------------------------------------------------

#Format Assignments and Initializations

# --------------------------------------------------------------------------

fmt Z 2 stck_init_z$ #Initial Z position of the stock (900-902,904,905)

fmt B 2 stck_final_z$ #Final Z position of the stock (900-902,904,905)

fmt Z 2 stck_chuk_st_z$ #Initial Z axis Chuck Position (900-903)

fmt X 2 stck_chuk_st_x$ #Initial X axis Chuck Position (900-903)

fmt Z 2 stck_chuk_end_z$ #Final Z axis Chuck Position (900-903)

fmt X 2 stck_chuk_end_x$ #Final X axis Chuck Position (900-903)

fmt B 3 stck_chuk_st_dz$ #Destination chuck Z axis reference position before transfer (900)

fmt U 3 stck_chuk_st_dx$ #Destination chuck X axis reference position before transfer (900)

fmt B 3 stck_chuk_end_dz$ #Destination chuck Z axis reference position after transfer (900)

fmt U 3 stck_chuk_end_dx$ #Destination chuck X axis reference position after transfer (900)

fmt B 2 stck_clear$ #Stock clearance value for stock pull operation (902)

fmt X 2 stck_tool_x$ #Tool X axis position for bar stop / puller (902)

fmt Z 2 stck_grip$ #Grip length value for stock pull operation(902)

fmt B 2 miscops_mr1$ #Final B Position for part off

 

fmt F 18 stck_adv_fr$ #Used with Lathe Stock Advance (Bar-Feed/Pull) function (NCI 902)

fmt F 18 stck_appr_fr$ #Used with Lathe Stock Advance (Bar-Feed/Pull) function (NCI 902)

 

fmt F 18 stck_adv_fr$ #Used with Lathe Stock Advance (Bar-Feed/Pull) function (NCI 902)

fmt F 10 stck_appr_fr$ #Used with Lathe Stock Advance (Bar-Feed/Pull) function (NCI 902)

#Flags

stck_op$ : 2 #Stock advance operation method (902)

#(0=Push stock,1=Push stock with Use Tool Stop option,2=Pull stock)

stck_spindle$ : 0 #Active spindle with stock to transfer (900-902)

#0=Left Spindle,1=Right Spindle

clmp_op$ : 0 #The selected Operation mode: 0=Clamp,1=Un-clamp,2=Re-position (903)

clmp_spindle$ : 0 #Active spindle for clamp/unclamp 0=Left Spindle,1=Right Spindle (903)

tlstck_on$ : 0 #Retract or engage the tailstock (0=Retract,1=Engage) (904)

 

toolend_flg : 1 #Flag to execute ptoolend sequence or not

 

 

 

# --------------------------------------------------------------------------

#Postblock Section -comments only!

# --------------------------------------------------------------------------

pstck_trans$ #NCI code = 900 available variables:

#stck_spindle, stck_init_z, stck_final_z,

#stck_chuk_st_z, stck_chuk_st_x,

#stck_chuk_end_z, stck_chuk_end_x,

#stck_chuk_st_dz, stck_chuk_st_dx,

#stck_chuk_end_dz, stck_chuk_end_dx

if toolchng <> two, ptoolend$

toolend_flg = zero #Do not execute ptoolend again after xfer

else,

 

 

if lturret$ = 0,

[

pcaxis_off_l_sub

]

if lturret$ = 1,

[

pcaxis_off_l

]

n$, pchg_n, "(PULL OUT & PART-OFF-BOTH)", e$

n$, "M135 (PARTS CATCHER ADVANCE)", e$

n$, "M177 (SUB-COLLET BLAST ON)", e$

n$, "M117 (SUB-COLLET OPEN)", e$

n$, "M157 (WORKPIECE EJECTOR OUT)", e$

n$, "M213 (CONVEYOR ON)", e$

n$, "M136 (PARTS CATCHER RETRACT)", e$

n$, "M138 (THROUGH SUB-SPINDLE COOLANT ON)", e$

n$, " ", e$

n$, pchg_m, "(SPINDLE SYNC WAIT CODE)", e$

n$, " ", e$

if mi5$ = 1, n$, "M180 (SYNC SPINDLE PHASE)", e$

#if mi5$ = 2, n$, "M35 (SYNC SPINDLE SPEED)", e$

n$, "M181 (PARTS CATCHER POSITION CHECK)", e$

n$, "G00 G55 B0.1", e$

n$, "M180 (SUB-SPINDLE SPEED CHECK)", e$

n$, "M139 (THROUGH SUB SPINDLE COOLANT OFF)", e$

n$, "M179 (SUB-COLLET BLAST OFF)", e$

n$, "G01", "G98", *stck_chuk_end_dz$, "F100.", "(SUB-OVER)", e$

n$, "M118 (COLLET CLOSE-SUB)", e$

n$, "M17 (COLLET OPEN-MAIN)", e$

n$, " ", e$

n$, "G01", "G98", miscops_mr1$, "F100.", "(SUB-PULL)", e$

n$, "M18 (COLLET CLOSE-MAIN)", e$

n$, pchg_m, "(WAIT CODE FOR PART OFF) ", e$

n$, "M01", e$

n$, " ", e$

n$, "M36 (SYNCHRONIZATION OFF)", e$

n$, "M05 ", e$

n$, "G00 G54 G28 B0.", e$

n$, "G00 G28 W0.", e$

n$, " ", e$

n$, pchg_m, "(END OF CODE WAIT CODE) ", e$

n$, "/2M30 ", e$

n$, "/M99 ", e$

pstck_flip$ #NCI code = 901 available variables:

#stck_spindle, stck_init_z, stck_final_z,

#stck_chuk_st_z, stck_chuk_st_x,

#stck_chuk_end_z, stck_chuk_end_x

if toolchng <> two, ptoolend$

toolend_flg = zero #Do not execute ptoolend again after xfer

[

!spaces$

spaces$ = zero

pbld, n$, "M00",e$

if prv_spaces$ > 0, " ",e$

"(Flip Stock)", e$

spaces$ = prv_spaces$

]

You can see I used a combination of misc. integers and Mastercam assigned parameters (stck_chuk_end_dz$) all of which coincide with the boxes inside the operations dialog.

You can look this up in the MastercamX_Post_Parameter_Ref.pdf (found in the documentation folder in MCX2/) and the V9 Post reference guide that I'm sure is on the FTP somewhere. It's how I learned.

Link to comment
Share on other sites

The out put looks good, just this error.

 

This is a single spindle machine (actally they all are).

 

Does it matter if they are single spindle. I understand if it's a totally different location like a duel spindle situation but I am just flipping and shifing in "Z" .050 olong the same "Z" axis.

 

Thanks

 

cheers.gif

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