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:

Canned text output postion?


Darin
 Share

Recommended Posts

I would like the canned text to output after the operation's finished just before the last G00 Z retract. When I select add after it outputs it before my operation. Where can I change this in this post?

 

 

This is how it outputs now with add after on a canned text

 

N100 G20

N110 G91 G28 Z0.

N120 G91 G28 X0. Y0. B0.

N130 G00 G17 G40 G49 G80 G90

N17 M01 ( 1-1/4 END MILL )

N140 T17 M06

N150 G00 G90 G55 X2.4218 Y2.4218 B0. S450 M03

N160 G43 H17 Z.1

N170 M05 <------------------------------- Need this to be before the G00 Z.1---------------------------------------->

N180 G01 Z-16.5 F15.

N190 G02 X2.6048 Y1.9799 I-.4419 J-.4419

N200 X1.9799 Y1.355 I-.6249 J0.

N210 X1.355 Y1.9799 I0. J.6249

N220 X1.9799 Y2.6048 I.6249 J0.

N230 X2.4218 Y2.4218 I0. J-.6249

N240 G00 Z.1

 

 

 

This is how I would like it to post

 

N100 G20

N110 G91 G28 Z0.

N120 G91 G28 X0. Y0. B0.

N130 G00 G17 G40 G49 G80 G90

N17 M01 ( 1-1/4 END MILL )

N140 T17 M06

N150 G00 G90 G55 X2.4218 Y2.4218 B0. S450 M03

N160 G43 H17 Z.1

N180 G01 Z-16.5 F15.

N190 G02 X2.6048 Y1.9799 I-.4419 J-.4419

N200 X1.9799 Y1.355 I-.6249 J0.

N210 X1.355 Y1.9799 I0. J.6249

N220 X1.9799 Y2.6048 I.6249 J0.

N230 X2.4218 Y2.4218 I0. J-.6249

N235 M05 <--------------------------------Post here---------------------------------->

N240 G00 Z.1

 

 

 

 

Here is the post

 

[post_VERSION] #DO NOT MOVE OR ALTER THIS LINE# V16.00 P0 E1 W16.00 T1368216059 M16.00 I0 O0

# Post Name : Fanuc 4X Mill.pst

# Product : Mill

# Machine Name : Mill

# Control Name : Fanuc

# Description : Generic 4 Axis Mill Post

# 4-axis/Axis subs. : Yes

# 5-axis : No

# Subprograms : Yes

# Executable : MP 14.0

#

# WARNING: THIS POST IS GENERIC AND IS INTENDED FOR MODIFICATION TO

# THE MACHINE TOOL REQUIREMENTS AND PERSONAL PREFERENCE.

#

# THIS POST REQUIRES A VALID 3 OR 4 AXIS MACHINE DEFINITION.

# YOU WILL RECEIVE AN ERROR MESSAGE IF MORE THAN ONE ROTARY AXIS IS DETECTED IN

# THE ACTIVE AXIS COMBINATION WITH READ_MD SET TO YES.

#

# Associated File List$

#

# GENERIC FANUC 4X MILL.control-5

#

# Associated File List$

#

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

# Revision log:

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

# CNC 06/09/05 - Initial post setup for Mastercam X

# CNC 10/06/05 - Changed parameter read for min_speed, modified pspindle, pprep$ and pset_mach

# - Modified pset_rot_label to use srot_y for horizontal machines

# - Added call to pset_mach in pq$ to set rotaxtyp$

 

 

 

Thanks

post-1869-0-33660600-1378520059_thumb.jpg

Link to comment
Share on other sites

Try this, First save a copy of your post and search for the following,

 

pcom_movea #Common motion preparation routines, after

pcan2

pe_inc_calc

 

Change to this,

pcom_movea #Common motion preparation routines, after

#pcan2<----------------------------------------------------------------------------------------Note: #

pe_inc_calc

 

 

Then search for the following section,

pretract #End of tool path, toolchange

sav_absinc = absinc$

absinc$ = one

sav_coolant = coolant$

coolant$ = zero

# if nextop$ = 1003, #Uncomment this line to leave coolant on until eof unless

[ # explicitely turned off through a canned text edit

if all_cool_off,

[

#all coolant off with a single off code here

if coolant_on, pbld, n$, sall_cool_off, e$

coolant_on = zero

]

else,

[

local_int = zero

coolantx = zero

while local_int < 20 & coolant_on > 0,

[

coolantx = and(2^local_int, coolant_on)

local_int = local_int + one

if coolantx > zero,

[

coolantx = local_int

pbld, n$, scoolantx, e$

]

coolantx = zero

]

coolant_on = zero

]

]

#cc_pos is reset in the toolchange here

cc_pos$ = zero

gcode$ = zero

pbld, n$, sccomp, *sm05, psub_end_mny, pcan2, e$ <--------------------------------------Note: pcan2 is inserted

pbld, n$, sgabsinc, sgcode, *sg28ref, "Z0.", scoolant, e$

if nextop$ = 1003 | tlchg_home, pbld, n$, *sg28ref, "X0.", "Y0.", protretinc, e$

else, pbld, n$, protretinc, e$

absinc$ = sav_absinc

coolant$ = sav_coolant

 

This should do it,

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