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:

G300 POSTING


COREY@SSI
 Share

Recommended Posts

This is my first time editing a post with x3

im starting to use master cam on my tsugami swiss machine and have been doing chop and paste with the code and now im interested in getting my post working correctly

im using the generic fanuc 4x post that came on the disc and i have my program head mostly configured excep for one line

 

my program head looks like this

 

%

O3031(CHECK VALVE)

M91

/M61

 

M93032

 

N10(START UP)

M501

G00G18G99T0/M08

M11

G300X-0.08Z1.256T0800 g300 is my problem

G150Z-0.008

M10

G00X5.4331Z-0.04T0

M502

 

 

g300 sets the stroke of the machine so the main collet doesnt hit the guide bushing

 

my plan was to use the stock length in stock setup to set the part lenght then add .580 to it in the post

 

i havent gotten to the math part yet but i did finally get the post to output the part length with a little extra junk attached

 

%

O0000

(PROGRAM NAME - TSUGAMI PROOFING)

(DATE=DD-MM-YY - 28-08-09 TIME=HH:MM - 16:05)

(MCX FILE - C:MCAMX3MCXTSUGAMI PROOFING.MCX)

(NC FILE - C:MCAMX3LATHENCTSUGAMI PROOFING.NC)

(MATERIAL - STEEL INCH - 1030 - 200 BHN)

G20

M91

/M61

M90000

N10(START UP)

M501;

G00G18G99T0/M08

M11;

G300X-0.08 Z stck_ht$ 6. T0800 curse.gif

G150Z-0.008

M10

G00X5.4331Z-0.04T0

M502

 

 

and here is what my post looks like at the moment

 

 

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

# Start of File and Toolchange Setup

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

ptime #Convert 24-hour time format into 12-hour AM/PM format

if time$ >= 13, time2 = (time$ - 12)

else, time2 = time$

hour = int(time2), min = frac(time2)

*hour, ":", *min,

if time$ > 12, " PM"

else, " AM"

 

pheader$ #Start of file

"%", e$

sav_spc = spaces$

spaces$ = 0

#*progno$, " (", sprogname$, ")", e$

*progno$, e$

"(", "PROGRAM NAME - ", sprogname$, ")", e$

"(", "DATE=DD-MM-YY - ", date$, " TIME=HH:MM - ", time$, ")", e$ #Date and time output Ex. 12-02-05 15:52

#"(", "DATE - ", month$, "-", day$, "-", year$, ")", e$ #Date output as month,day,year - Ex. 02-12-05

#"(", "DATE - ", *smonth, " ", day$, " ", *year2, ")", e$ #Date output as month,day,year - Ex. Feb. 12 2005

#"(", "TIME - ", time$, ")", e$ #24 hour time output - Ex. 15:52

#"(", "TIME - ", ptime ")", e$ #12 hour time output 3:52 PM

 

spathnc$ = ucase(spathnc$)

smcname$ = ucase(smcname$)

stck_matl$ = ucase(stck_matl$)

snamenc$ = ucase(snamenc$)

 

"(", "MCX FILE - ", *smcpath$, *smcname$, *smcext$, ")", e$

"(", "NC FILE - ", *spathnc$, *snamenc$, *sextnc$, ")", e$

"(", "MATERIAL - ", *stck_matl$, ")", e$

spaces$ = sav_spc

pbld, n$, *smetric, e$

"M91"e$

"/M61"e$

"M90000"e$

"N10(START UP)"e$

"M501;"e$

"G00G18G99T0/M08"e$

"M11;"e$

"G300X-0.08","Z",*stck_ht$,"T0800"e$ confused.gif

"G150Z-0.008"e$

"M10"e$

"G00X5.4331Z-0.04T0"e$

"M502"e$

Link to comment
Share on other sites

Search for fmt.

 

 

code:

fmt  T  4   t$          #Tool No

fmt T 4 first_tool$ #First Tool Used

fmt T 4 next_tool$ #Next Tool Used

fmt D 4 tloffno$ #Diameter Offset No

fmt H 4 tlngno$ #Length Offset No

fmt G 4 g_wcs #WCS G address

fmt P 4 p_wcs #WCS P address

fmt S 4 speed #Spindle Speed

fmt M 4 gear #Gear range

In this section of the post, variables are formatted or declared.

 

 

Search for fs2.

 

In this section the formats are defined.

 

code:

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

# 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 8 5 0 5 0l #Integer, force five 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 (feedrate)

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

fs2 17 1.4 1.3lt #Decimal, absolute, 4/3 trailing

Lets assume you want the variable stck_ht$ to output as a "Z" and have 4 decimal places.

 

Add a line to format the variable.

 

code:

fmt  T  4   t$          #Tool No

fmt T 4 first_tool$ #First Tool Used

fmt T 4 next_tool$ #Next Tool Used

fmt D 4 tloffno$ #Diameter Offset No

fmt H 4 tlngno$ #Length Offset No

fmt G 4 g_wcs #WCS G address

fmt P 4 p_wcs #WCS P address

fmt S 4 speed #Spindle Speed

fmt M 4 gear #Gear range

fmt Z 12 stck_ht$ #Stock height for G300 line

The 12 refers to the fs2 statement numbered 12 describing a 4 place decimal.

 

Now stck_ht$ will output as a "Z".

 

You can now change this line:

 

"G300X-0.08","Z",*stck_ht$,"T0800"e$

 

To:

 

"G300X-0.08",*stck_ht$,"T0800"e$

 

You should get the output you're looking for now.

HTH

Link to comment
Share on other sites

i emailed my contact at my reseller to get the guide but i have another question

 

lets say i want to add a value to the stock_ht value

 

i use it in 2 places

the first in the g300 line where i need to add 1/2 an inch

 

the second is my partoff/transfer

i want to add .01 just so i have shock to clean up.

 

ive been scrolling thru the post trying to find the formatting to add to the value but im coming up dry

Link to comment
Share on other sites

Instead of altering the value in pre-defined variable stck_ht$ I would suggest decalring your own variable and then assign the desired value (stck_ht$ + value) to your user-defined variable.

 

Where Mastercam Guru shows formatting stck_ht$ do this instead ->

 

fmt Z 12 g300value #Stock height for G300 line

 

Now in the postblock(s) where you need to output ...

 

g300value = stck_ht$ + 0.5

"G300X-0.08", *g300value, "T0800", e$

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