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 at tool change


Recommended Posts

I added this function to a MPMaster post several years ago.

In the General output settings section:

tseqno      : 3     #Output sequence number at toolchanges when omitseq = yes
                    #0=off, 1=seq numbers match toolchange number, 2=seq numbers match tool number, 3 = Mastercam Operations Manager Operation Number

in the pprameter$ postblock add:

           if prmcode$ = 15240, opmgr_opno = rpar(sparameter$,1)      #Operation number

Turn off "Output sequence numbers in the CD:

 

Capture.PNG

Link to comment
Share on other sites
2 hours ago, Doug Funny said:

I was able to add the line but, when I went to post I get an error. do I need to define  opmgr_opno as a variable name?

Yes, I'm sorry. In the Misc strings section add:

opmgr_opno  : 0    #15240 - Operation number
2 hours ago, Doug Funny said:

I was able to add the line but, when I went to post I get an error. do I need to define  opmgr_opno as a variable name?

You are actually adding a string, not a variable.

1 minute ago, So not a Guru said:
You are actually adding a string, not a variable.

The added line initializes the string

  • Thanks 1
Link to comment
Share on other sites

Hi Tim,

I want the N numbers to be sequential regardless of the tool number and only at the tool change. So not a Guru has gotten me to the point where I get N numbers on my tool changes but, there seems to be a bit of logic missing because they are all the same number.

 

N1 TXX M6

N2 TXX M6

N3 TXX M6

Link to comment
Share on other sites

Try this:

#declaration of variables:

blockno : 0 #Mastercam operation number

 

#format statement

 

fmt  "N" 4 blockno     #Output mcam opperation no. to NC file

 

#add this starting in a first column:

pfn             #Output block numbers = mcam op number
	  blockno = opinfo(15240,0)
	  if op_id$ <> prv_op_id$ & blockno<>-99999,
	    [
	    *blockno
	    ]

#add this where the toolchange is:

pbld, *pfn, *t$, "M6",e$

 

  • Like 1
Link to comment
Share on other sites
1 hour ago, Doug Funny said:

Hi Tim,

I want the N numbers to be sequential regardless of the tool number and only at the tool change. So not a Guru has gotten me to the point where I get N numbers on my tool changes but, there seems to be a bit of logic missing because they are all the same number.

 

N1 TXX M6

N2 TXX M6

N3 TXX M6

In the ptlchg_com postblock

After this line:

          if tseqno = 2, n$ = t$

Add this line:

      if tseqno = 3, n$ = opmgr_opno

 

  • Thanks 1
Link to comment
Share on other sites

EUREKA! Thank you sir! I've been a Camworks user for most of my career and only recently started using Mastercam. This forum is so much better than any I've found for camworks. There are a lot of incredibly smart and helpful people here. More often than not, I get answers here quicker than from tech support...

  • Thanks 1
  • Like 2
Link to comment
Share on other sites
42 minutes ago, Doug Funny said:

EUREKA! Thank you sir! I've been a Camworks user for most of my career and only recently started using Mastercam. This forum is so much better than any I've found for camworks. There are a lot of incredibly smart and helpful people here. More often than not, I get answers here quicker than from tech support...

Glad I was able to help. Sorry it took so many tries, it was a long time ago that I modded that post and I'm getting senile. :)

  • Like 2
Link to comment
Share on other sites
  • 1 year later...

I wondering ,can use sequence number to my lathe post ?

something like this 

(TOOL - 3 OFFSET - 3)
(RIGHT TURRET - 80 DEG.  INSERT - CNMG-432)
(CANED RGH OD)    -------------------------------------------------------     N1   (CANED RGH OD)
G0 T0303
M8
G97 S114 M03
G0 G54 X11.7
G0 Z.1707
G50 S1500
G96 S350

 

 

 

Link to comment
Share on other sites
1 hour ago, mirek1017 said:

I wondering ,can use sequence number to my lathe post ?

something like this 

(TOOL - 3 OFFSET - 3)
(RIGHT TURRET - 80 DEG.  INSERT - CNMG-432)
(CANED RGH OD)    -------------------------------------------------------     N1   (CANED RGH OD)
G0 T0303
M8
G97 S114 M03
G0 G54 X11.7
G0 Z.1707
G50 S1500
G96 S350

 

 

 

Sure. Need to decide how are going to sequence them and how you want the output to be controlled.

Link to comment
Share on other sites
Just now, mirek1017 said:

I like to get N block every operation 

I have mine set so N# follows T#

N1 (OD 80 DEG) 
G18 G20 G40 G54 G80 G99 
G00 G53 X0. Y0. T0 
T101 
G40 G54 G80 G99 
M155 
M08 
G50 S3500 
G96 S450 M03 
G00 X2.1 Y0. Z0.01 
M88 
 
M05 
M89 
G00 G53 X0. Y0. T0 
M01 

N3 (OD 55 DEG) 
G18 G20 G40 G54 G80 G99 
G00 G53 X0. Y0. T0 
T303 
G40 G54 G80 G99 
M08 
G50 S3500 
G96 S450 M03 
G00 X1.5787 Y0. Z0.0072 
M88 
 
M05 
M89 
G00 G53 X0. Y0. T0 
M01

Link to comment
Share on other sites
2 minutes ago, AHarrison1 said:

I have mine set so N# follows T#

N1 (OD 80 DEG) 
G18 G20 G40 G54 G80 G99 
G00 G53 X0. Y0. T0 
T101 
G40 G54 G80 G99 
M155 
M08 
G50 S3500 
G96 S450 M03 
G00 X2.1 Y0. Z0.01 
M88 
 
M05 
M89 
G00 G53 X0. Y0. T0 
M01 

N3 (OD 55 DEG) 
G18 G20 G40 G54 G80 G99 
G00 G53 X0. Y0. T0 
T303 
G40 G54 G80 G99 
M08 
G50 S3500 
G96 S450 M03 
G00 X1.5787 Y0. Z0.0072 
M88 
 
M05 
M89 
G00 G53 X0. Y0. T0 
M01

yes  something like this 

Link to comment
Share on other sites
30 minutes ago, mirek1017 said:

so this work the same way in lathe post ?

I can find this in my lathe post 

pbld, *pfn, *t$, "M6",e$

Something has to define the pfn logic. In MPLMASTER there is this switch:

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

We then search the post to find where and how it was used:

ltlchg$          #Toolchange, lathe
. section not shown
. section not shown
. section not shown
. section not shown
      if not(synch_flg & tool_op$ = 67),     #Suppress tool output if cutoff during part xfer
        [
        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$          #Toolchange, mill
. section not shown
. section not shown
. section not shown
. section not shown 
      if omitseq$ = 1 & tseqno > 0,
        [
        if tseqno = 2, n$ = t$
        pbld, *n$, [if home_type = -1, *sgcode], *toolno, e$
        ]
pheader$         #Start of file
      pheader_custom
      if tseqno = 1 & omitseq$ = 1,
        [
        seqno$ = 1
        seqinc$ = 1
        n$ = seqno$
        ]

Then from there we can see what variables where defined and how we want to adapt it to the post we are using.

  • Thanks 1
Link to comment
Share on other sites
4 minutes ago, crazy^millman said:

Something has to define the pfn logic. In MPLMASTER there is this switch:

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

We then search the post to find where and how it was used:

ltlchg$          #Toolchange, lathe
. section not shown
. section not shown
. section not shown
. section not shown
      if not(synch_flg & tool_op$ = 67),     #Suppress tool output if cutoff during part xfer
        [
        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$          #Toolchange, mill
. section not shown
. section not shown
. section not shown
. section not shown 
      if omitseq$ = 1 & tseqno > 0,
        [
        if tseqno = 2, n$ = t$
        pbld, *n$, [if home_type = -1, *sgcode], *toolno, e$
        ]
pheader$         #Start of file
      pheader_custom
      if tseqno = 1 & omitseq$ = 1,
        [
        seqno$ = 1
        seqinc$ = 1
        n$ = seqno$
        ]

Then from there we can see what variables where defined and how we want to adapt it to the post we are using.

I hope  I can get only .00001%  your  knowledge 

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