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:

HOME POSITION OUTPUT in lathe post


mig
 Share

Recommended Posts

Hi,

How i can force in G-code output "Home position " after tool change.

right now i have next output :

N100 G00

N110 G20

N120 G99

N130 G50 S3500

N140 G54 T0202 ( T2 OD FINISH RIGHT - 35 DEG. INSERT - VNMG-431 )

N150 G96 S200 M03

( ------RIGHT HERE -------) I would like to have "Home position" defind volume .

N160 G00 X2.0185 Z0.1

N170 G01 Z0. F0.005

N180 Z-0.5412

N190 G02 X2.0216 Z-0.574 R0.3531

N200 G01 X2.284 Z-1.9804

N210 G03 X2.3335 Z-2.512 R5.7226

N220 G01 Z-8.8583

N230 X2.4749 Z-8.7876

N240 M09

N250 G00 X5. Z0.25

N260 T0200 M05

N270 M30

Thank you in advance

Link to comment
Share on other sites

We added the home position at the end of the tool. This way you can run the tool, it goes home, it can stop on M1 (if optional stop is selected), allowing you to check a diameter and re-run if required.

The output looks like this:-

%

O0999

( CUSTOMER )

( DESCRIPTION )

( DRG NO )

( ISSUE NO: )

( OP NO: )

( BILLET SIZE =??MM PER )

( BAR LENGTH =??MM = ?? COMPONENTS )

( HOLD IN ?? )

( CHUCK PRESSURE =??PSI )

( BILLET PROTRUSION =??MM )

( Z ZERO =?? )

 

G21 G40 G80 G90 G95

G28U0.W0.T00M5M9

G92 S1000

 

M1

(TOOL - 1 OFFSET - 1)

(LATHE TOOL 1)

G28 U0. W0. G40 G80 G95 M5 M9

T0101

G97 S2500 M3

G0 X0. Z5.

Z2.

G1 Z-5. F250.

G0 Z5.

G28 U0. W0. G40 G80 M5 M9

T0100

M30

%

 

We hard coded the post here

 

ltlchg$ #Toolchange, lathe

toolchng = one

gcode$ = zero

copy_x = vequ(x$)

pcc_capture #Capture LCC ends, stop output RLCC

c_rcc_setup$ #Save original in sav_xa and shift copy_x for LCC comp.

pcom_moveb #Get machine position, set inc. from c1_xh

c_mmlt$ #Position multi-tool sub, sets inc. current if G54...

"M1"e$

if tseqno = 2,

[

n$ = t$

*n$, e$

]

ptoolcomment

comment$

if home_type < two, #Toolchange G50/home/reference position

[

sav_xh = vequ(copy_x)

sav_absinc = absinc$

absinc$ = zero

start_xh = vequ(xh$)

pmap_home #Get home position, xabs

ps_inc_calc #Set start position, not incremental

#Toolchange home position

if home_type = one,

pbld, n$, *sgcode, pwcs, e$

else,

[

#Toolchange home position

pbld, n$, *sg28ref, "U0.", "W0.", "G40", "G80", "G95", "M5", "M9", e$ <<<<<<<<<<<<<<<<<<<

if home_type = zero, pbld, n$, e$

 

HTH

  • Like 1
Link to comment
Share on other sites

Thank you for the replay .

 

my problem is when machine (tool) from initial position (x,z switches) moving on rapid (G0) to program initial point ( example X2.0 Z0.1) it moving on 45 deg angle then what is left over on Z moving straight . If i am using center it could crush into the turret.

To avoid crush i would like to let machine move on home position first ( example x5. z0.25)

Thank you

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