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:

Post question about comments


Camfun
 Share

Recommended Posts

Hi folks! biggrin.gif

 

I have a question about comments in my post.

I create this for our TNC426 control post based in Heidenhain post include in MC CD.

This post works fine with me, but now, i want add the operation comments in NC code, but i don´t be get.

I try several stuffs, and not yet. frown.gif

 

Look below the stretchs from my post and my NC code generated for him.

 

quote:

NC Code:

60 BLK FORM 0.1 Z X-225. Y-190. Z-15.

70 BLK FORM 0.2 X225. Y190. Z0.

80 L Z0 FMAX M91

90 ; <-- This line should contain the operation comment.

100 TOOL CALL 1 Z S6000 ;BROCA CENTRO 8 MM_ DIAMETRO+8 RAIO CANTO 0.

110 M3

120 CYCL DEF 32.0 TOLERANCIA

130 CYCL DEF 32.1 T0.01

140 L X-200 Y-165 R F MAX

150 L Z200. F MAX

160 L X-200 Y-165 F MAX

170 CYCL DEF 200 FURAR Q200=2. Q201=-5. Q206=160. Q202=0.5 Q210=0 Q203=20. Q204=200. Q211=0.

180 L X-200 Y-165 F MAX M99

360 CYCL DEF 32.0 TOLERANCIA

370 CYCL DEF 32.1

380 L Z0 FMAX M91

390 ; <-- This line should contain the operation comment.

400 TOOL CALL 2 Z S940 ;BROCA 8.5 MM_ DIAMETRO+8.5 RAIO CANTO 0.

410 M3

420 CYCL DEF 32.0 TOLERANCIA

430 CYCL DEF 32.1 T0.01

440 L X-200 Y-165 R F MAX

450 L Z200. F MAX

460 L X-200 Y-165 F MAX

470 CYCL DEF 200 FURAR Q200=2. Q201=-24.554 Q206=187. Q202=2. Q210=0 Q203=20. Q204=200. Q211=0.

480 L X-200 Y-165 F MAX M99

560 CYCL DEF 32.0 TOLERANCIA

570 CYCL DEF 32.1

580 L Z0 FMAX M91

590 ; <-- This line should contain the operation comment.

600 TOOL CALL 3 Z S1600 ;BROCA 4.8 MM_ DIAMETRO+4.8 RAIO CANTO 0.

610 M3

620 CYCL DEF 32.0 TOLERANCIA

630 CYCL DEF 32.1 T0.01

640 L X-205.004 Y+131.998 R F MAX

650 L Z200. F MAX

660 L X-205.004 Y+131.998 F MAX

670 CYCL DEF 200 FURAR Q200=2. Q201=-23.442 Q206=190. Q202=2. Q210=0 Q203=20. Q204=200. Q211=0.

680 L X-205.004 Y+131.998 F MAX M99

 

quote:

My post:

pcomment # Manual Entry - COMMENTS (on a block by itself) 1005,1006

if gcode=1005, pcomment1n # output comment with seq

if gcode=1006, pcomment1 # output comment w/o seq

if gcode=1007, pcomment1l # output comment with line

 

pcomment1n # Manual Entry - COMMENTS (on a block by itself) 1005

scomm = ucase (scomm)

n, "L","Z0","FMAX","M91", e

spaces=0

n, " M00;", " ", scomm, e

spaces=1

pcomment1 # Manual Entry - COMMENTS (on a block by itself) 1006

scomm = ucase (scomm)

n, "L","Z0","FMAX","M91", e

spaces=0

n, " M00;", " ", scomm, e

spaces=1

 

pcomment1l # Manual Entry - COMMENTS (on a block by itself) 1007

scomm = ucase (scomm)

n, "L","Z0","FMAX","M91", e

spaces=0

n, " M00;", " ", scomm, e

spaces=1

 

 

spaces=1

psetstockcentertop, e

n, "L","Z0","FMAX","M91", e

n, ";", comment, e <-- This line should be place the comments in NC code.

n, stoolcall, t, *sgplane, *ss, ";", ptoolcomm, e

n, pspdl, e

n, sdef3, e

n, sdef4, e

pcan1, n, strl, *x, *y, pcc, strf, smax, strcantext, e

if opcode <> three, n, strl, *z, strf, smax, strm

pcan2

pinit

 

ptlchg0 # Null tool change 1000

n, ";", comment, e <-- This line should be place the comments in NC code.

if prv_ss <> ss, n, stoolcall, t, *sgplane, *ss

pcan

 

ptlchg # Tool change 1002

pcan

n, sdef5, e

n, sdef6, e

n, "L","Z0","FMAX","M91", e

n, ";", comment, e <-- This line should be place the comments in NC code.

n, stoolcall, t, *sgplane, *ss, ";", ptoolcomm, e

n, pspdl, e

n, sdef3, e

n, sdef4, e

pcan1, n, strl, *x, *y, pcc, strf, smax, strcantext, e

if opcode <> three, n, strl, *z, strf, smax, strm

pcan2

pinit

 

peof0 # End of file for tool zero 1003

peof

 

peof # End of file for non-zero tool 1003

n, sdef5

n, sdef6

n, "L","Z0","FMAX","M91", "M5", e

n, "L","X0","Y0","FMAX","M91", e

n, strl, strr, strf, "M30; ** FIM DE PROGRAMA **"

n, sendpgm, *progname, sinch

17

 

 

LinkPhoto?GUID=6c8c6df0-2607-6c17-53a3-1fcc5ce47d54&size=

 

What´s wrong.

Where I miss?

 

I put my post in FTP, is somebody want give a look.

ftp://mastercam:[email protected]/Ma...c/TNC426HV9.zip

 

 

Thanks in advance, and sorry my wrong english.

Link to comment
Share on other sites

I could be wrong but I think you are looking for the tool desc. from the tool libray. look for this

 

 

ptoolcomm # Comments from tool library

spaces=0

strtool=ucase(strtool)

if strtool<>snull, pn, ";", *strtool, peob, e

else, pn, ";", "DEFINE TOOL NAMES", peob, e

 

 

then this

 

 

ptlchg_com #Tool change common blocks

comment

pcom_moveb

c_mmlt #Multiple tool subprogram call

pn, ";", peob, e

pwcs,pindex

pbld, pn, "TOOL CALL ", *t, *sgplane, *speed, peob, e

pbld, pn, *feed, e

ptoolcomm ( put it here )

Link to comment
Share on other sites

CamFun,

I downloaded your post and tried it and have the same problem as you did. You could ask your reseller to get the MPmaster post off of this site, it works beautiful. Sorry, not much help. I'd be the blind guy trying to show the guy with 20/20 vision how to cross the street.

Greg

Link to comment
Share on other sites

CAMFUN,

 

Your PCOMMENT postblock ->

 

code:

 pcomment # Manual Entry - COMMENTS (on a block by itself) 1005,1006

if gcode=1005, pcomment1n # output comment with seq

if gcode=1006, pcomment1 # output comment w/o seq

if gcode=1007, pcomment1l # output comment with line


The Operation Comment is 'gcode = 1008', which is not being tested for.

Link to comment
Share on other sites

And, of course, the correct code:

 

pcomment # Manual Entry - COMMENTS (on a block by itself) 1005,1006

 

if gcode=1005, pcomment1n # output comment with seq

 

if gcode=1006, pcomment1 # output comment w/o seq

 

if gcode=1007, pcomment1l # output comment with line

 

if gcode=1008, pcommenttxt #

 

pcomment1n # Manual Entry - COMMENTS (on a block by itself) 1005

scomm = ucase (scomm)

n, "L","Z0","FMAX","M91", e

spaces=0

n, " M00;", " ", scomm, e

spaces=1

 

 

pcomment1 # Manual Entry - COMMENTS (on a block by itself) 1006

scomm = ucase (scomm)

n, "L","Z0","FMAX","M91", e

spaces=0

n, " M00;", " ", scomm, e

spaces=1

 

 

pcomment1l # Manual Entry - COMMENTS (on a block by itself) 1007

scomm = ucase (scomm)

n, "L","Z0","FMAX","M91", e

spaces=0

n, " M00;", " ", scomm, e

spaces=1

 

 

pcommenttxt

scomm = ucase (scomm)

spaces=0

scomm, e

spaces=1

 

spaces=1

psetstockcentertop, e

n, "L","Z0","FMAX","M91", e

n, ";", comment, e

n, stoolcall, t, *sgplane, *ss, ";", ptoolcomm, e

n, pspdl, e

n, sdef3, e

n, sdef4, e

pcan1, n, strl, *x, *y, pcc, strf, smax, strcantext, e

if opcode <> three, n, strl, *z, strf, smax, strm

pcan2

pinit

 

ptlchg0 # Null tool change 1000

 

if prv_ss <> ss, n, ";", comment,

n, stoolcall, t, *sgplane, *ss, e

pcan

 

ptlchg # Tool change 1002

pcan

n, sdef5, e

n, sdef6, e

n, "L","Z0","FMAX","M91", e

n, ";", comment, e

n, stoolcall, t, *sgplane, *ss, ";", ptoolcomm, e

n, pspdl, e

n, sdef3, e

n, sdef4, e

pcan1, n, strl, *x, *y, pcc, strf, smax, strcantext, e

if opcode <> three, n, strl, *z, strf, smax, strm

pcan2

pinit

 

peof0 # End of file for tool zero 1003

peof

 

peof # End of file for non-zero tool 1003

n, sdef5

n, sdef6

n, "L","Z0","FMAX","M91", "M5", e

n, "L","X0","Y0","FMAX","M91", e

n, strl, strr, strf, "M30; ** FIM DE PROGRAMA **"

n, sendpgm, *progname, sinch

17

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