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:

mpmaster post edit help


gms1
 Share

Recommended Posts

Hey guys,

 

Im trying to remove the tool change at the beginning of my programs when I post out. I've sent the post to my reseller and he was at a loss as how to remove it. Im gonna post here hoping I can get some kind of help to get rid of this because I have to hand edit it out every time I post.

 

code:

%                                       pmachineinfo$ pheader$

:2586 (T) pmachineinfo$ pheader$

(MCX FILE - 60405-101.MCX) pmachineinfo$ pheader$

(PROGRAM - T.65V) pmachineinfo$ pheader$

(DATE - OCT-24-2006) pmachineinfo$ pheader$

(T15 | 1-1/2 FINISHMILL .118 RAD | H15 | D65 | D1.5000) pwrtt$ pwrtt$

(T13 | 1 INCH MITS BXD .06 RAD | H16 | D66 | D1.0000) pwrtt$ pwrtt$

(T4 | 1/4 SPOTDRILL | H16 | D66 | D0.2500) pwrtt$ pwrtt$

N15T15M6(1-1/2 FINISHMILL .118 RAD) psof$ ptoolcomm

(OKUMA & HOWA 65V) psof$ pcomment2

G0G90G54X-.3524Y-2.5713S984M3T13 psof$ ptlchg_com

The N15T15M6 tool line needs to be changed. It needs to stay with the N code and tool comment but the toolchange needs to go. Everything i've tried so far has resulted in some crazy things happening (like tool changes in the middle of code).

Im fairly certain I need some kind of if statement in the $psof part of the post but I dont know what it needs to function.

 

This post is a modified mpmaster version x post. I am using mcamx 10.1.3.34 (mp1/sp2) lvl 3

Link to comment
Share on other sites

John: We don't change tools at the beginning of programs. Its always at the end of programs so when the program is executed the spindle starts instead of changing a tool. My old mpmaster post had this feature but anything I've tried with the new version just doesnt work.

 

Terry: That wont work, ive tried and failed miserably with doing that. This is what happens when you remove ptlchg_com:

 

code:

 %                                       pmachineinfo$ pheader$

:2593 (T) pmachineinfo$ pheader$

(MCX FILE - 60409-101.MCX) pmachineinfo$ pheader$

(PROGRAM - T.65V) pmachineinfo$ pheader$

(DATE - OCT-25-2006) pmachineinfo$ pheader$

(T15 | 1-1/2 FINISHMILL .118 RAD | H13 | D63 | D1.5000) pwrtt$ pwrtt$

(T13 | 1 INCH MITS BXD .06 RAD | H13 | D63 | D1.0000) pwrtt$ pwrtt$

(T4 | 1/4 SPOTDRILL | H14 | D64 | D0.2500) pwrtt$ pwrtt$

Z.415 pzrapid$ prapidout

M9 prapid$ p__65:1735

X-34.3878Y2.02M8 prapid$ prapidout

It removes the 1st line of the tool and skips a bunch of stuff after that.

 

This is my psof post block

code:

 psof$            #Start of file for non-zero tool number

ptravel

pwritbuf5

pcuttype

toolchng = one

if ntools$ = one,

[

#skip single tool outputs, stagetool must be on

#stagetool = m_one

!next_tool$

]

tooltotal = rbuf(4,0) #Reads total tool and null tool changes

if toolcountn <= tooltotal, nexttool = rbuf(4,toolcountn)

else, nexttool = first_tool$

 

if tool_table = 2, ppredstck,e$

if tool_table = 3, pmetastck,e$

 

spaces$=0

if output_z = yes$ & tcnt > 1,

[

"(OVERALL MAX - ", *z_tmax, ")", e$

"(OVERALL MIN - ", *z_tmin, ")", e$

]

spaces$=sav_spc

 

if plane$ < 0, plane$ = 0

#pbld, n, *sgcode, *sgplane, *smetric, "G40", "G80", *sgabsinc, e

sav_absinc = absinc$

if wcstype <= one, #Work coordinate system

[

absinc$ = one

pfbld, n$, sgabsinc, "G28", "Z0.", e$

pfbld, n$, "G28", "X0.", "Y0.", e$

pfbld, n$, "G92", *xh$, *yh$, *zh$, e$

absinc$ = sav_absinc

]

sav_mi9 = mi9$

sav_workofs = workofs$

if sav_workofs < 0, sav_workofs = 0

ptlchg_com

sof=0

That is basic mpmaster psof code there. Im now thinking I need to add something to the ptlchg_com section that checks for beginning of program.

Link to comment
Share on other sites

Copy the ptlchg_com block into the psof where it is called and remove the t$ and M06.

 

sof$ #Start of file for non-zero tool number

ptravel

pwritbuf5

pcuttype

toolchng = one

if ntools$ = one,

[

#skip single tool outputs, stagetool must be on

#stagetool = m_one

!next_tool$

]

tooltotal = rbuf4,0 #Reads total tool and null tool changes

if toolcountn <= tooltotal, nexttool = rbuf4,toolcountn

else, nexttool = first_tool$

 

if tool_table = 2, ppredstck,e$

if tool_table = 3, pmetastck,e$

 

spaces$=0

if output_z = yes$ & tcnt > 1,

[

"OVERALL MAX - ", *z_tmax, "", e$

"OVERALL MIN - ", *z_tmin, "", e$

]

spaces$=sav_spc

 

if plane$ < 0, plane$ = 0

#pbld, n, *sgcode, *sgplane, *smetric, "G40", "G80", *sgabsinc, e

sav_absinc = absinc$

if wcstype <= one, #Work coordinate system

[

absinc$ = one

pfbld, n$, sgabsinc, "G28", "Z0.", e$

pfbld, n$, "G28", "X0.", "Y0.", e$

pfbld, n$, "G92", *xh$, *yh$, *zh$, e$

absinc$ = sav_absinc

]

sav_mi9 = mi9$

sav_workofs = workofs$

if sav_workofs < 0, sav_workofs = 0

ptlchg_com <<<<<<<<<<<<Replace this with the guts of ptlchg_com block.

sof=0

Link to comment
Share on other sites

quote:

omg storkman you are my hero

oh god...mental picture of the Stork walking around the office hollering

"whos the man" "whos the man"

 

Dont get him going gms1... a simple thank you to him should be sufficient, any more then that makes his head so big we are all hear about it all day. bonk.gifbiggrin.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...