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:

Operation comment question


Recommended Posts

Hello,

I am using MP post for 3x VMC, I have edit the post to move M01 from before M06 to after M06 like the code I have pasted here.

Quote

G5.1 Q1
(ROUGH OUTSIDE)
(COMPENSATION TYPE - WEAR COMP)
N1 T18 M6
M01
 (2 INCH SHELL MILL 4.5 LOT)
( MAX -  Z2. )
( MIN -  Z-4.3016 )
G00 G17 G90 G54 X-3.025 Y-1.25 S8500 M03
G43 H18 Z2. T1
M08
Z.1

My question is how can I edit the post to move the operation comment location like this one

Quote

G00 G17 G20 G40 G80 G90
G91 G28 Z0.
G5.1 Q1
(ROUGH OUTSIDE)  <--- Move from here
(COMPENSATION TYPE - WEAR COMP)
N1 T18 M6
M01
 (2 INCH SHELL MILL 4.5 LOT)
(ROUGH OUTSIDE) <--- to here
( MAX -  Z2. )
( MIN -  Z-4.3016 )
G00 G17 G90 G54 X-3.025 Y-1.25 S8500 M03
G43 H18 Z2. T1
M08
Z.1
G G01 Z.05 F150.

 

Thank you very much

Link to comment
Share on other sites

You will need to move the location of the 'comment$' Command Variable.

Typically, the 'comment$' command is setup to "dump all the buffered comment strings", at whatever location you see that Command Variable.

'comment$' needs to be on a line, all by itself. (It must also have at least 1 space character in front of it. Typical "indent" spacing is 6 space characters.)

So, in your existing Post, locate the line of code that has 'comment$' on it, and place a Pound Sign (or Hash Mark, depending on your word choice). [ # ]

This will 'comment out' the line of code.

Now, simply insert a new blank line, after the line where your "M01" is coming out, and then enter  '     comment$'.

Your Operation Comment will be output after the "M01" line.

Link to comment
Share on other sites
11 hours ago, Colin Gilchrist said:

You will need to move the location of the 'comment$' Command Variable.

Typically, the 'comment$' command is setup to "dump all the buffered comment strings", at whatever location you see that Command Variable.

'comment$' needs to be on a line, all by itself. (It must also have at least 1 space character in front of it. Typical "indent" spacing is 6 space characters.)

So, in your existing Post, locate the line of code that has 'comment$' on it, and place a Pound Sign (or Hash Mark, depending on your word choice). [ # ]

This will 'comment out' the line of code.

Now, simply insert a new blank line, after the line where your "M01" is coming out, and then enter  '     comment$'.

Your Operation Comment will be output after the "M01" line.

Thank you for your rely,

I have try to edit my post file like this but still not worked.

Quote

ptlchg_com      #Tool change common blocks
      if force_output | sof,
        [
        result = force(ipr_type,ipr_type)
        result = force(absinc$,absinc$)
        result = force(plane$,plane$)
        ]
      pcom_moveb
      pcheckaxis      #Check for valid rotary axis
      if sof, uninhibit_probe$
      c_mmlt$ #Multiple tool subprogram call
      #ptoolcomment
      if sof & scomm_sav <> snull,
        [
        spaces$ = 0
        n$, pspc, scomm_str, *scomm_sav, scomm_end, e$
        spaces$ = sav_spc
        ]
      if sof = 0, scomm_sav = snull
      #comment$
      #pcomment3
      pmisccheck
      pcan
      if stagetool >= zero,
        [
        if omitseq$ = 1 & tseqno > 0,
          [
          if tseqno = 2, n$ = t$
          pbld, *n$, *t$, *sm06, e$
          pbld, n$, *sm01, e$
          comment$
          pbld, n$, ptoolcomm, e$
          ]
        else, [
        pbld, n$, *t$, *sm06, e$
        pbld, n$, *sm01, e$
        comment$
        pbld, n$, ptoolcomm, e$
        ]
        ]
      spaces$=0
      if output_z = yes$,

and here is my nc file

Quote

G00 G17 G20 G40 G80 G90
G91 G28 Z0.
G5.1 Q1
(SPOT DRILL M4 HOLE)
M08
N1 T5 M6
M01
 (3/8 SPOTDRILL 3.75 LOT)
(MAX - Z2.)
(MIN - Z-.0675)
G00 G17 G90 G55 X5.1378 Y-.8573 S2000 M03
G43 H5 Z2. T9
Z.1

there is something wrong with my post?

 

Thank you

Link to comment
Share on other sites

Thank you Colin, I have make my post work by add the code for comment

Quote

if stagetool >= zero,
        [
        if omitseq$ = 1 & tseqno > 0,
          [
          if tseqno = 2, n$ = t$
          pbld, *n$, *t$, *sm06, e$
		  pbld, n$, *sm01, e$ 
		  #pbld, n$, ptoolcomm, e$
          ]		  	  
        else, [
		pbld, n$, *t$, *sm06, e$
		pbld, n$, *sm01, e$
		#pbld, n$, ptoolcomm, e$
        ]	
		]
        [
        spaces$ = 0
		comment$
		"(",*t$, "-",pstrtool, ")", e$
        ]

I have another question the line 

Quote

"(",*t$, "-",pstrtool, ")", e$

I used that line for Tool number and comment so the Setup guy can check with tool list. But my question is does it is proper code to use?

here is my nc code output

Quote

G5.1Q1
(SPOT DRILL M4 HOLE)
N5 T5 M06
M01
(T5-3/8 SPOTDRILL 3.75 LOT )
(MAX - Z2.)
(MIN - Z-.0675)
G00 G17 G90 G55 X5.1378 Y-.8573 S2000 M03
G43 H5 Z2. T9
M08
....
.
.
.
.
N9 T9 M06
M01
(DRILL M3 HOLE DEPTH 0.259)
(T9-0.0995 DRILL #39 )
(MAX - Z2.)
(MIN - Z-.4253)
G00 G17 G90 G55 X6.4961 Y-.7874 S3500 M03
G43 H9 Z2. T10

The first tool still do not have the operation comment. 

Can anyone tell me how to fix it or which post block to looking for.

Thank you

Best Regard

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