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:

Sequence Numbers


Recommended Posts

Hi.

 

I'm trying to get a post to output N sequence numbers but the trick here is I need N numbers to match Tool change # * 100 so program will look like this:

 

(TOOL - 1 OFFSET - 1)

(OD ROUGH RIGHT - 80 DEG. INSERT - CNMG-432)

(ROUGH FACE)

 

N100 G50 S1000

N102 G0 X4.7 Z.065 G96 S150 M03 T0101 M8 M42

N104 G99 G1 X-.0625 F.01

N106 G0 Z.165

 

(TOOL - 2 OFFSET - 2)

(OD 55 DEG 1/32 RAD INSERT - DNMG-432 KC850)

(FINISH FACE)

 

N200 G50 S1000

N202 G0 X4.5959 Z.1 G96 S220 M03 T0202 M8 M42

N204 G1 Z0. F.015

N206 X-.0625 F.008

N208 Z.1

N210 G0 Z.2

 

(TOOL - 1 OFFSET - 1)

(OD ROUGH RIGHT - 80 DEG. INSERT - CNMG-432)

(ROUGH FACE & OD)

 

N300 G50 S1000

N302 G0 X4.7 Z.165 G96 S150 M03 T0101 M8 M42

N304 G1 Z.065 F.015

N306 X-.0625 F.01

N308 Z.165

 

Doing a search on the forum I found how to make N# match Tool change number for MPLMaster but I can't figure out how to make it be *n$ * 100 and to keep on going thru the rest of the blocks 'til tool change.

 

Any ideas?

 

Thanks a lot in Advance.

Link to comment
Share on other sites

This is a little more complicated. Setting tseqno to 1 will output only a single sequence number at the start of the tool change. When tseqno = 1, the post is actually using the n$ variable to count the tool changes. Since you want to keep outputting sequence numbers through the operation, you will need to create a different tool change counter. Forget about tseqno, it's not setup to do this.

 

Set tseqno to 0, define a tool change counter, and just set the sequence number equal to the tool change number * 100 at the start of each tool change (in ltlchg$ and mtlchg$). Try something like this:

 

toolchng_cnt    : 0

ltlchg$
...
     if not(synch_flg & tool_op$ = 67),     #Suppress tool output if cutoff during part xfer
       [
       toolchng_cnt = toolchng_cnt + 1      #Increments tool change number
       seqno$ = toolchng_cnt * 100          #Sets current sequence number to tool change number * 100
       n$ = seqno$                          #sets sequence number for output
       if omitseq$ = 1 & tseqno > 0,
         [
         if tseqno = 2, n$ = t$
         pbld, *n$, [if home_type = -1, *sgcode], *toolno, e$
         ]
       else, pbld, n$, [if home_type = -1, *sgcode], *toolno, e$
       ]

mtlchg$
     ...
     toolchng_cnt = toolchng_cnt + 1
     seqno$ = toolchng_cnt * 100
     n$ = seqno$
     if omitseq$ = 1 & tseqno > 0,
       [
       if tseqno = 2, n$ = t$
       pbld, *n$, [if home_type = -1, *sgcode], *toolno, e$
       ]
     else, pbld, n$, [if home_type = -1, *sgcode], *toolno, e$

 

Then all you need to do is make sure your sequence numbers are being output in the control def, and set the sequence number increment to the appropriate value (looks like 2 for you).

 

HTH

Link to comment
Share on other sites

Thanks Chris, That worked out good but the new count needs to be outside the If call out.

 

Besides that, I'm having a tough time getting canned cycles to follow the previous method, as it will always restart from some odd number as in the example shown:

 

(TOOL - 1 OFFSET - 1)

(OD ROUGH RIGHT - 80 DEG. INSERT - CNMG-432)

(ROUGH SHAFT)

 

N500 G50 S1000

N502 G0 X4.6282 Z.25 G96 S150 M03 T0101 M41

N504 Z.1707

N672 G71 P676 Q704 D.1 U.02 W.01 F.012

N674 (CANNED CYCLE CUT)

N676 G0 X1.4186 S150 W0.

N678 G1 Z.0524

N680 X1.7222 Z-.0994

N682 G3 X1.7405 Z-.1215 I-.0221 K-.0221

N684 G1 Z-1.7486

N686 X1.9124 Z-1.8345

N688 G3 X1.9286 Z-1.8485 I-.0221 K-.0221

N690 G1 X1.9954 Z-1.9732

N692 G3 X1.9975 Z-1.9813 I-.0302 K-.0081

N694 G1 Z-9.9313

N696 G2 X2.175 Z-10.02 I.0887 K0.

N698 G1 X4.395

N700 G3 X4.4392 Z-10.0292 I0. K-.0313

N702 G1 X4.4916 Z-10.0554

N704 X4.6282

 

Is there a variable that tells the post if it is an ID or OD cut? I would like to get some different retract options enabled on the post, but would like to read it from the NCI.

 

Thanks in advance

Link to comment
Share on other sites

Well this is for a lathe Post so no many lines on a program. In this case it's even worst as there is only 50 blocks per tool to be used, as they are using 2 as the increment, but I get your point and I made the same comment when I first saw a program.

 

This is an old shop and they are trying to "match what the operators are used to" as they used to make everything by hand back in the day when they started running CNCs. That's why I need those CC to work as they used them a lot.

 

Thanks for the input :thumbup:

Link to comment
Share on other sites
  • 3 years later...

I see that this is an old post that I found during a search.

 

I would like to modify a X7 Generic Fanuc Lathe post to output sequence # only at tool changes.

 

It seemed like this variable posted above would do the trick...

 

tseqno : 2 #Output sequence number at toolchanges when omitseq = yes
#0=off, 1=seq numbers match toolchange number, 2=seq numbers match tool number

 

But I can't find the tseqno in the lathe post file. Would someone please fill in the blanks for me :)

 

Thank you,

Barry

Link to comment
Share on other sites

Hi Barry,

 

In-House Solutions (The company that hosts this website), has produced a series of free post processors that have options like "tool sequence" built into the post. Search for "MPMaster" (should be a link to download under the "posts" section of this site.), and download a fresh copy of the post, for the Mastercam version you are using. (They have produced a MPMaster post version for every release of Mastercam X.)

 

So once you have a copy of MPMaster, there will be a switch at the top of the post that you can set. (A "switch" is just a numeric variable that has a different action, depending on the starting value that you set the variable for startup.)

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