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:

G76 Thread Canned Cycle Post Mod


Tim Simmermon
 Share

Recommended Posts

Hey guys,

 

I am trying to modify my G76 post to output numbers without decimals for my Q, R, P & Q values.

 

The post turns out

 

G76 P011829 Q.008 R.001

G76 X.5649 Z-1.1 P301 Q80 R0. F.0556

 

I want it to look like:

 

G76 P011829 Q0080 R0010

G76 X.5649 Z-1.1 P0301 Q0080 R0. F.0556

 

I have tried changing the the first four variables on this to have a 16 format, but it is not changing the posted values.

 

# Thread output

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

fmt P 2 thddepth$ #Thread height absolute

fmt Q 2 thdfirst$ #First depth cut in thread

fmt Q 2 thdlast$ #Last depth cut in thread

fmt R 2 thdfinish$ #G76 thread finish allowance

fmt R 3 thdrdlt #Thread R delta G92 and G76

fmt U 3 thd_dirx #Incremental X move for G76 mult starts

fmt W 3 thd_dirz #Incremental Z move for G76 mult starts

fmt P 5 nspring$ #Number of spring cuts

fmt 5 thdpull #G76 thread pull off

fmt 5 thdang #G76 threading angle

 

Any ideas on what I could be doing wrong?

 

This post is a modified MPLFan post that came with X. Thanks in advance!

Link to comment
Share on other sites

Chris,

 

This is the canned cycle in the post. I don't see anything in here to change. I am a rookie when it comes to post mods, so if I am leaving out any info , I apologize.

 

pg76new #G76 threading new style

pbld, n$, *sthdgcode, *nspring$, *thdpull, *thdang, *thdlast$,

*thdfinish$, e$

pbld, n$, *sthdgcode, pfxout, pfzout, *thddepth$, *thdfirst$,

*thdrdlt, pffr, e$

 

I don't see any format statements here.

Link to comment
Share on other sites

It might have something to do with the new / old switch or other things that affect canned cycles:

 

--------

psetup #Setup post based on NCI settings

home_type = mi1

sbufname3 = spathnci + snamenci + sextext

spathext = spathnci

snameext = snamenci

#Set metric defaults

if met_tool = one,

[

conversion = 1000

ltol = ltol_m

vtol = vtol_m

maxfeedpm = maxfeedpm_m

lcc_move = lcc_move_m

]

 

#Setup for old or new style canned cycles

if old_new_sw = one,

[

result = newfs (16, thddepth)

result = newfs (16, thdfirst)

]

else,

[

result = nwadrs (stra, thdang)

result = nwadrs (stri, thdrdlt)

result = nwadrs (strk, thddepth)

result = nwadrs (strd, thdfirst)

#Lathe canned cycle old style conversion

result = nwadrs (strd, depthcc)

result = nwadrs (strd, ncutscc)

result = nwadrs (stri, g73x)

result = nwadrs (strk, g73z)

result = nwadrs (stri, grvspcc)

result = nwadrs (strk, grvdpcc)

]

---------------------------

 

If you search the post for "newfs" you might happen across one that is affecting you

 

 

ALWAYS save a 'master copy' of your post before you start tweaking

 

C

Link to comment
Share on other sites

Chris,

 

I talked to my reseller and you were right. In the area that you showed:

 

#Setup for old or new style canned cycles

if old_new_sw = one,

[

result = newfs (16, thddepth)

result = newfs (16, thdfirst)

 

The 16 forced the format. The # 16 format was 4 places with no decimals, but it only allowed for trailing zeros and not leading. He wrote a new format that allowed leading and trailing zeros, then we changed it in both places.

 

Thanks for helping!

Link to comment
Share on other sites

Rocket Ray,

 

Add the #25 format as shown below

 

# Format statements - n=nonmodal, l=leading, t=trailing, i=inc, d=delta

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

#Default english/metric position format statements

fs2 1 0.7 0.6 #Decimal, absolute, 7 place, default for initialize

fs2 2 0.4 0.3 #Decimal, absolute, 4/3 place

fs2 3 0.4 0.3d #Decimal, delta, 4/3 place

#Common format statements

fs2 4 1 0 1 0 #Integer, not leading

fs2 5 2 0 2 0l #Integer, force two leading

fs2 6 3 0 3 0l #Integer, force three leading

fs2 7 4 0 4 0l #Integer, force four leading

fs2 9 0.1 0.1 #Decimal, absolute, 1 place

fs2 10 0.2 0.2 #Decimal, absolute, 2 place

fs2 11 0.3 0.3 #Decimal, absolute, 3 place

fs2 12 0.4 0.4 #Decimal, absolute, 4 place

fs2 13 0.5 0.5 #Decimal, absolute, 5 place

fs2 14 0.3 0.3d #Decimal, delta, 3 place

fs2 15 0.2 0.1 #Decimal, absolute, 2/1 place

fs2 16 0 4 0 4t #No decimal, absolute, 4 trailing

#Default english/metric feed format statements

fs2 17 0.2 0.1 #Decimal, absolute, 2/1 place

fs2 18 0.4 0.3 #Decimal, absolute, 4/3 place

fs2 19 0.5 0.4 #Decimal, absolute, 5/4 place

fs2 20 1 0 1 0n #Integer, forced output

 

# These formats used for 'Date' & 'Time'

fs2 21 2.2 2.2lt #Decimal, force two leading & two trailing (time2)

fs2 22 2 0 2 0t #Integer, force trailing (hour)

fs2 23 0 2 0 2lt #Integer, force leading & trailing (min)

fs2 25 0 4 0 4tl # G76 Cycle -----ADD THIS ONE

 

Then make the following changes in the body of your post:

 

# Thread output

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

fmt P 2 thddepth$ #Thread height absolute

fmt Q 2 thdfirst$ #First depth cut in thread

fmt Q 2 thdlast$ #Last depth cut in thread

 

-----Change all the 2's to 25's in the above

 

and then change this also

 

#Setup for old or new style canned cycles

if old_new_sw = one,

[

result = newfs (16, thddepth) ----Change 16 to 25

result = newfs (16, thdfirst) ----Change 16 to 25

 

Hope that helps!

Link to comment
Share on other sites

Tim,

 

Yes, it helped for all but the feedrate. My post is outputing an "E" instead of an "F" in the 2nd line of the G76 code. see below. The machine control will not accept this.

 

G76 X.5 Z-.63 P271 Q106 R0. E.05

 

Any ideas?

Thanks for all the help.

 

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