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:

Tool reference numbers


Recommended Posts

I have a small problem with my post for our Mazak machines when I'm using the tool references, since the Mazak don't read the variable from 0-100 when restarting..

 

This is an example of what it posts:

 

 

(ZERO POINT)

#100=55 (1. ZERO POINT)

(TOOLS)

#1=00 (#1 = )

#2=00 (#2 = )

#3=00 (#3 = )

#4=00 (#4 = )

#5=00 (#5 = )

#6=00 (#6 = )

#7=00 (#7 = )

#8=00 (#8 = )

#9=00 (#9 = )

#10=00 (#10 = )

#11=00 (#11 = )

#12=00 (#12 = )

(START PROGRAM)

M1

G0G40G80G90

G28G91Z0

G90

N12

T#12

M6

(Ø8 )

G61.1

M8

S5000M3

G0G90G#100X112.5Y0.

G43H#12Z50.T#1

 

How do I change on my post, so it's getting like this:

 

(ZERO POINT)

#100=55 (1. ZERO POINT)

(TOOLS)

#901=00 (#1 = )

#902=00 (#2 = )

#903=00 (#3 = )

#904=00 (#4 = )

#905=00 (#5 = )

#906=00 (#6 = )

#907=00 (#7 = )

#908=00 (#8 = )

#909=00 (#9 = )

#910=00 (#10 = )

#911=00 (#11 = )

#912=00 (#12 = )

(START PROGRAM)

M1

G0G40G80G90

G28G91Z0

G90

N12

T#912

M6

(Ø8 )

G61.1

M8

S5000M3

G0G90G#100X112.5Y0.

G43H#912Z50.T#901

 

Thanks in advance for any help! :)

Link to comment
Share on other sites

It's tough to give you exact code without seeing the specific post blocks, but you need to add code in your toolchange post block and in your pwrtt$ post block.

 

In pwrtt$, something like this:

toolno = 900 + t$

*toolno, "=00(", *t$, "=)", e$

 

then in ptlchg_com, ptlchg$ or ptoolcall (where ever *t$ is found):

t$ = t$ + 900

 

You will also need to copy the format statement for t$ and apply it to toolno for this to work.

Link to comment
Share on other sites

OK, I can find the "toolno=t$" but the "ptlchg$" i can find, but can't find the t$ = t$

 

Mine looks like this:

 

ptlchg$ #Tool change

pcuttype

toolchng = one

if mi1$ = one, #Work coordinate system

[

pfbld, n$, *sg28ref, "X0.", "Y0.", e$

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

]

pcom_moveb

c_mmlt$ #Multiple tool subprogram call

#pbld, n,"N",t,e

#ptoolcomment

#comment

pcan

result = newfs(15, feed) #Reset the output format for 'feed'

#pbld, n, "T",35,*t,e

pbld, n$,"M1", e$

pbld, n$, "M6", e$

pbld,"N",t$,ptoolcomment

comment$

pbld, n$,"G61.1", e$

#pbld, n,"G0G90B0.0", e

#pbld, n,pwcs

#pbld, n,"G52X",35,"100","Y",35,"101","Z",35,"102", e

#pbld, n,"M130", e

#pbld, n,"M51", e

pbld, n$, scoolant,e$

pbld, n$,*speed, *spindle, pgear, strcantext,e$

pindex

sav_absinc = absinc$

if mi1$ > one, absinc$ = zero

pcan1, pbld, n$, *sgcode, *sgabsinc, pwcs, pfxout, pfyout, e$

pbld, n$, "G43", "H",35,*tlngno$, pfzout,"T",35, next_tool$, e$

absinc$ = sav_absinc

pcom_movea

toolchng = zero

c_msng$ #Single tool subprogram call

 

 

 

What is " format statement"?.. Sorry my ignorance, but I'm kind of new to editing post processors myself...

Link to comment
Share on other sites

from the code above it looks like this is the line that outputs your tool:

 

pbld,"N",t$,ptoolcomment

 

so you would need to change this to:

 

t$ = 900 + t$

pbld,"N",t$,ptoolcomment

 

format statements define how the variables are being output. You can search for "fmt" to find where the variables are formatted. Copy the format for the t$ and replace the t$ with toolno:

fmt "#" 4 t$ #Tool No

fmt "#" 4 toolno #Tool No

Link to comment
Share on other sites

I have tried to do what you wrote, but now it post out 9xx numbers correct as tool numbers, but the rest is still not correct..

 

G0G40G80G90

G28G91Z0

G90

Nt$ 12. (Should be N912)

T#t$ 12. (Should be T#912)

M6

(Ø8 BALLMILL = 12)

G61.1

M8

S5000M3

G0G90G#100X112.5Y0.

G43H#12Z50.T#1 (Should be G43H#912Z50.T#901)

Z1.

 

It might just be me who screwed up something, but if you got a quick clue it would be great, else I'll send it to my reseller!

Link to comment
Share on other sites

Try replacing;

pbld,"N",t$,ptoolcomment

 

with;

t$ = t$ + 900

pbld, n$, t$, ptoolcomment, e$

t$ = t$

 

 

t$ = t$ + 900

pbld, n$, t$, ptoolcomment, e$

t$ = t$<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<this will not do anything (not sure if prv_t$ exists as a predefined variable type thingamajig, if it does you could use t$ = prv_t$).... if you are trying to change it back to the original value before adding the 900, you would need...t$ = t$ - 900

 

Guffie, if you're still looking at this issue let us know

Link to comment
Share on other sites

 

Guffie, if you're still looking at this issue let us know

 

Yes, but I turned to my reseller in the end.. I was trying some different things as proposed, since I want to learn, but I never got exactly what I wanted! But thanks for all the info anyway, it gave me a better understanding of some things!

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