Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X
Hi there,
I am currently setting up a 3-Axis DNM Doosan 500ii with a Siemens Sinumerik 828D Control and Creo 3.0 as the CAM software
I am having some issues with the output G-Code concerning the tool Change.
At the moment I get:
N9 M5
N10 T9 M6
N11 S4000 M3
with T(Position Number)
What I Need is:
N9 M5
N10 T="Tool Name" M6
N11 S4000 M3
is there anyone that could help me?
Thank you!
Hello,
As an instant solution you can easily substitute T9 by "ENDMILL DIA 10" by example.
On a longer term you have to correct your postprocessor.
We did it for our own DMG machining centre with Siemens 840Dsl.
If you send me a CL file, I can postprocess it for you to show you that it works.
Best regards,
Jef Verheyen,
KU Leuven
Faculty of Industrial Engineering
Campus De Nayer
2860 Sint-Katelijne-Waver
Belgium
Thank you for your fast reply!
With the instant solution I already had my code running but because I am working as a student for a chair of my univerisity they want me to correct the postprocessor.
I tried putting in some fil data:
CIMFIL/ON,PPRINT
$$ Macro to store the tool name in a variable
$$ to re-issue with the tool change
TXT=TEXT/CLW $$ Text of message
TEST=TEXT/'TOOL NAME' $$ Text to test for
OKCOM=INDXF(TXT,TEST)
IF (OKCOM.NE.0) THEN
$$ This is a tool comment
MESS=TEXT/OMIT,TXT,1 $$ Omit trailing blank
COL=TEXT/':'
COLPOS=INDXF(MESS,COL) $$ position of : in MESS
LEN=CANF(MESS,1) $$ number of char in MESS
NMESS=TEXT/RANGE,MESS,COLPOS+1,LEN $$ Extract from : to end
ELSE
DMY=POSTF(13) $$ Process
ENDIF
CIMFIL/OFF
CIMFIL/ON,LOADTL
IF (OKCOM.EQ.0) THEN
DMY=POSTF(13) $$ Process
ELSE
$$ Tool name programmed
XX=POSTF(2,1,1867,1) $$ no tape output
DMY=POSTF(13) $$ process tool change
TNUM=POSTF(7,4) $$ Tool number
XX=POSTF(2,1,1867,0) $$ re-activate tape output\
INSERT/'T',TNUM,'M6(',NMESS,')$'
ENDIF
CIMFIL/OFF
But it had some issues with this code and output an error.
Maybe someone can spot my mistake or point me in the right direction?
Kind regards
Hi,
I have modified your macros little bit.
Notice that Cimfil MACHIN macro was added too.
CIMFIL/ON,PPRINT
$$ Macro to store the tool name in a variable
$$ to re-issue with the tool change
TXT=TEXT/CLW $$ Text of message
TEST=TEXT/'TOOL NAME' $$ Text to test for
OKCOM=INDXF(TXT,TEST)
IF (OKCOM.NE.0) THEN
$$ This is a tool comment
MESS=TEXT/OMIT,TXT,1 $$ Omit trailing blank
COL=TEXT/':'
COLPOS=INDXF(MESS,COL) $$ position of : in MESS
LEN=CANF(MESS,1) $$ number of char in MESS
NMESS=TEXT/RANGE,MESS,COLPOS+1,LEN $$ Extract from : to end
NMESS=TEXT/OMIT,NMESS,3 $$ Omit all spaces
ELSE
DMY=POSTF(13) $$ Process
ENDIF
CIMFIL/OFF
CIMFIL/ON,LOADTL
IF (OKCOM.EQ.0) THEN
DMY=POSTF(13) $$ Process
ELSE
$$ Tool name programmed
XX=POSTF(2,1,1867,1) $$ no tape output
DMY=POSTF(13) $$ process tool change
TNUM=POSTF(7,4) $$ Tool number
XX=POSTF(2,1,1867,0) $$ re-activate tape output\
$$ INSERT/'T',TNUM,'M6(',NMESS,')$'
INSERT/' T="',NMESS,'" M6$'
OKCOM=0 $$ Initialization
ENDIF
CIMFIL/OFF
CIMFIL/ON,MACHIN
DMY=POSTF(13) $$ Process
OKCOM=0 $$ Initialization
CIMFIL/OFF
Now, when the tool name is outputed via PPRINT, tool record will be in format: T="TOOL_NAME" M6
When the tool name is NOT outputed via PPRINT, tool record will be in format: T=TOOL_NUMBER M6
Regards