Skip to main content
8-Gravel
March 21, 2014
Question

Getting tools to Post Out to my programs??

  • March 21, 2014
  • 3 replies
  • 7040 views

Anyone know how to get the tools from my Manufaturing to post out to my programs so that the list of tools and sizes are in the program for the operator. Now i write them down or use the "Process Documention" button to this after the fact and give to operator.

Jeff

    3 replies

    14-Alexandrite
    March 24, 2014

    Jeff,

    Looks like you need to activate the tools options on PPRINT table. On Creo2 look on the Manufacturing tab under Machine Tool Setup / PPRINT / Modify
    There are a number of options referring to tools. Activate those that you need. Probably the options you need are TOOL_TABLE and ONLY_OUTPUT_USED_TOOLS
    If after that you still don’t see the tools on the programs it means that tool table output is disabled on the post-processor. Here I'm not quite sure what you need to do. I think you need to look if PPRINT comments are enabled

    21-Topaz II
    March 26, 2014

    Jeff,

    I went through this a while back, and as stated above, you need to set the PPRINT parameters. Here's a link to the discussion I had on here, and I posted my solution, too.

    http://communities.ptc.com/message/194250#194250

    If you have any other questions, or maybe want me to send you my full post processor file, feel free to ask.

    jeuclide8-GravelAuthor
    8-Gravel
    March 27, 2014

    Hey guys thanks for the responces. I did change the PPRINT option and nothing posts out to my programs??? Maybe like Gabriel says my PPRINT is off?? Here is my FIL data, any ideas if this looks correct? PRINT/ON should this be PPRINT/ON maybe?

    Jeff

    $$====================================================
    $$ -------- Post-Processor Name: HAAS VF1 ------
    $$====================================================
    $$
    $$ ****************************************************
    $$ * G L O B A L S e c t i o n s *
    $$ ****************************************************
    REDEF/ON
    DMY=POSTF(24,1) $$ Debug options **
    PRINT/ON
    $$
    A=1;B=2;C=3;D=4;E=5;F=6;G=7;H=8;I=9;J=10;K=11;L=12;M=13;N=14
    O=15;P=16;Q=17;R=18;S=19;T=20;U=21;V=22;W=23;X=24;Y=25;Z=26
    $$
    TLCUNT=0
    $$ Support for CSINK cycle : output G81 for a CSINK cycle
    DMY=POSTF(2,1,471,81) $$ Set INTCOM 471 to 81

    $$ ****************************************************
    $$ * R E P L A C S e c t i o n s *
    $$ ****************************************************
    T1=TEXT/' - / ';T2=TEXT/' - ';REPLAC/T1,T2
    T1=TEXT/' - 1 ';T2=TEXT/' - 01 ';REPLAC/T1,T2
    T1=TEXT/' - 2 ';T2=TEXT/' - 02 ';REPLAC/T1,T2
    T1=TEXT/' - 3 ';T2=TEXT/' - 03 ';REPLAC/T1,T2
    T1=TEXT/' - 4 ';T2=TEXT/' - 04 ';REPLAC/T1,T2
    T1=TEXT/' - 5 ';T2=TEXT/' - 05 ';REPLAC/T1,T2
    T1=TEXT/' - 6 ';T2=TEXT/' - 06 ';REPLAC/T1,T2
    T1=TEXT/' - 7 ';T2=TEXT/' - 07 ';REPLAC/T1,T2
    T1=TEXT/' - 8 ';T2=TEXT/' - 08 ';REPLAC/T1,T2
    T1=TEXT/' - 9 ';T2=TEXT/' - 09 ';REPLAC/T1,T2
    T1=TEXT/'M6';T2=TEXT/'M06';REPLAC/T1,T2
    T1=TEXT/'M5';T2=TEXT/'M05';REPLAC/T1,T2

    $$ ****************************************************
    $$ * M A C R O S e c t i o n s *
    $$ ****************************************************
    $$-------------------------------------------------------
    $$ Macro to extract elements of time and date
    $$--------------------------------------------------------
    TIMDAT=MACRO/
    TIMEDD=TEXT/TIMES
    MONTH=TEXT/RANGE,TIMEDD,1,2
    DATE=TEXT/RANGE,TIMEDD,4,5
    YEAR=TEXT/RANGE,TIMEDD,7,8
    HOUR=TEXT/RANGE,TIMEDD,10,11
    MINUTE=TEXT/RANGE,TIMEDD,13,14
    SECOND=TEXT/RANGE,TIMEDD,16,17
    TERMAC

    $$-------------------------------------------------------
    $$ Macro to extract the contents before and after ':'
    $$ in PPRINT (except OPERATION COMMENTS)
    $$--------------------------------------------------------
    PRTCON=MACRO/
    COLON=TEXT/':'
    MESTYP=TEXT/'----'
    MESCON=TEXT/'----'
    $$
    MESAGE=TEXT/CLW $$ Get text in PPRINT
    COLPOS=INDXF(MESAGE,COLON) $$ Find position of ':'
    IF(COLPOS .NE. 0)THEN $$ In case ':' exist
    MESAGE=TEXT/OMIT,MESAGE,1
    MESAGE=TEXT/OMIT,MESAGE,2
    NBCHAR=CANF(MESAGE,1)
    MESAGE=TEXT/RANGE,MESAGE,2,NBCHAR
    MESAGE=TEXT/OMIT,MESAGE,1
    MESAGE=TEXT/OMIT,MESAGE,2
    NBCHAR=CANF(MESAGE,1)
    COLPOS=INDXF(MESAGE,COLON)
    $$ Get contents before ':'
    MESTYP=TEXT/RANGE,MESAGE,1,(COLPOS-1)
    MESTYP=TEXT/OMIT,MESTYP,1
    MESTYP=TEXT/OMIT,MESTYP,2 $$ Text before ':', message type
    $$ Get contents after ':'
    MESCON=TEXT/RANGE,MESAGE,(COLPOS+1),NBCHAR
    MESCON=TEXT/OMIT,MESCON,1
    MESCON=TEXT/OMIT,MESCON,2 $$ Text after ':', message contents
    ENDIF
    TERMAC

    $$-------------------------------------------------------
    $$ Macro to find all PPRINT/TOOL NAME and LOADTL record
    $$ and save them in MACRO
    $$--------------------------------------------------------
    TLINFO=MACRO/
    CUCLPO=POSTF(7,1)
    T1=TEXT/'TOOL NAME'
    TLINDX=1
    INDEX1=1
    $$
    DMY=POSTF(2,1,1836,1) $$ Suppress all warnings
    RESERV/TLNAME,100,TLNUMB,100,OFFSET,100,CYCFLG,100
    DMY=POSTF(2,1,1836,0) $$ Enable warnings
    $$
    DO/ENDDO2,BBB=1,100,1
    TLNAME(BBB)=TEXT/'NO TOOL NAME DEFINED IN NCL FILE'
    CYCFLG(BBB)=0
    ENDDO2)CONTIN
    $$
    DO/ENDDO1,AAA=1,3,1
    DMY=POSTF(14)
    WORD_2=POSTF(7,2)
    WORD_3=POSTF(7,3)
    IF(WORD_2 .NE. 14000)THEN
    CASE/WORD_3
    WHEN/(ICODEF(PPRINT))
    CALL/PRTCON
    OKTLCM=CMPRF(MESTYP,T1)
    IF(OKTLCM .EQ. 1)THEN
    TLNAME(TLINDX)=TEXT/MESCON
    TLINDX=TLINDX+1
    ENDIF
    WHEN/(ICODEF(LOADTL))
    TOOLNB=POSTF(7,4) $$ Get tool info.
    FIVWOD=POSTF(7,5)
    SIXWOD=POSTF(7,6)
    TLNUMB(INDEX1)=TOOLNB
    IF(FIVWOD .EQ. ICODEF(OSETNO))THEN $$ If offset # exist
    OFFSET(INDEX1)=SIXWOD
    ELSE $$ No offset #, use tool # instead
    OFFSET(INDEX1)=TOOLNB
    ENDIF
    INDEX1=INDEX1+1
    WHEN/(ICODEF(CYCLE)) $$ Check if a CYCLE is used for
    CYCFLG(INDEX1-1)=1 $$ this tool
    ENDCAS
    AAA=2
    ELSE
    AAA=4
    DMY=POSTF(15,(CUCLPO+1))
    ENDIF
    ENDDO1)CONTIN
    TERMAC

    $$---------------------------------
    $$ Current register contents MACRO
    $$---------------------------------
    REGVAL=MACRO/
    AVAL=POSTF(1,3,292);NVAL=POSTF(1,3,305)
    BVAL=POSTF(1,3,293);OVAL=POSTF(1,3,306)
    CVAL=POSTF(1,3,294);PVAL=POSTF(1,3,307)
    DVAL=POSTF(1,3,295);QVAL=POSTF(1,3,308)
    EVAL=POSTF(1,3,296);RVAL=POSTF(1,3,309)
    FVAL=POSTF(1,3,297);SVAL=POSTF(1,3,310)
    GVAL=POSTF(1,3,298);TVAL=POSTF(1,3,311)
    HVAL=POSTF(1,3,299);UVAL=POSTF(1,3,312)
    IVAL=POSTF(1,3,300);VVAL=POSTF(1,3,313)
    JVAL=POSTF(1,3,301);WVAL=POSTF(1,3,314)
    KVAL=POSTF(1,3,302);XVAL=POSTF(1,3,315)
    LVAL=POSTF(1,3,303);YVAL=POSTF(1,3,316)
    MVAL=POSTF(1,3,304);ZVAL=POSTF(1,3,317)
    TERMAC

    $$=====================================================
    $$ C I M F I L S E C T I O N
    $$=====================================================
    $$ ****************************************************
    $$ * M A C H I N S e c t i o n s *
    $$ ****************************************************
    CIMFIL/ON, MACHIN
    DMY=POSTF(13)
    SEQNO/OFF
    INSERT/'(PROGRAM NAME - ',PTNUMB, ' )$'
    CALL/TIMDAT
    INSERT/'(DATE, DAY-MONTH-YEAR - ',DATE,'-',MONTH,'-',YEAR,' )$'
    $$
    CALL/TLINFO
    DO/ENDDO3,CCC=1,(TLINDX-1),1
    INSERT/'( TOOL -', TLNUMB(CCC), ' DIA. OFF. -' $
    TLNUMB(CCC), ' LENGTH -', TLNUMB(CCC), ' ', TLNAME(CCC),' )$'
    ENDDO3)CONTIN
    $$
    INSERT/' $'
    SEQNO/ON
    INSERT/' G00 G40 G49 G80 G90$'
    SEQNO/30,INCR,5,1
    CIMFIL/OFF

    $$ ****************************************************
    $$ * C O O L N T S e c t i o n s *
    $$ ****************************************************
    CIMFIL/ON, COOLNT
    DMY=POSTF(12,4) $$ Set CL to 4 digits
    WORD_4=POSTF(7,4)
    IF(WORD_4 .NE. ICODEF(OFF))THEN
    REPEAT/Z,M,8
    ELSE
    REPEAT/Z,M,9
    ENDIF
    CIMFIL/OFF


    $$ ****************************************************
    $$ * L O A D T L S e c t i o n s *
    $$ ****************************************************
    CIMFIL/ON,LOADTL
    CUTLNB=POSTF(7,4) $$ Added 04/30/01
    DMY=POSTF(20)
    SEQNO/OFF
    INSERT/' $'
    SEQNO/ON
    DMY=POSTF(21)
    DMY=POSTF(12,6)
    DMY=POSTF(9,5,(ICODEF(OSETNO)))
    DMY=POSTF(10,6,CUTLNB)
    DMY=POSTF(13)
    TLCUNT=TLCUNT+1
    REPEAT/OFF
    REPEAT/G,A,90
    CIMFIL/OFF

    $$ ****************************************************
    $$ * C U T C O M S e c t i o n s *
    $$ ****************************************************
    CIMFIL/ON,CUTCOM $$ Force CUTCOM # same as Tool #
    WORD_4=POSTF(7,4)
    IF(WORD_4 .NE. ICODEF(OFF))THEN
    DMY=POSTF(10,5,CUTLNB)
    ENDIF
    DMY=POSTF(13)
    CIMFIL/OFF

    $$ ****************************************************
    $$ * P A R T N O S e c t i o n s *
    $$ ****************************************************
    CIMFIL/ON,PARTNO
    PTNUMB=TEXT/CLW
    PTNUMB=TEXT/OMIT,PTNUMB,1
    PTNUMB=TEXT/OMIT,PTNUMB,2
    CIMFIL/OFF

    $$ ****************************************************
    $$ * S P I N D L S e c t i o n s *
    $$ ****************************************************
    CIMFIL/ON,SPINDL
    WORD_4=POSTF(7,4)
    IF(WORD_4 .NE. ICODEF(OFF))THEN
    DMY=POSTF(2,1,1867,1) $$ Disable Tape output
    DMY=POSTF(13) $$ Process
    DMY=POSTF(2,1,1867,0) $$ Enable Tape output
    CALL/REGVAL
    $$REPEAT/OFF
    IF((CYCFLG(TLCUNT)) .EQ. 0)THEN $$ If no CYCLE exist, output Dxx
    REPEAT/X,Y,D,CUTLNB,ALL $$ Added 04/30/01
    ENDIF
    REPEAT/X,Y,Z,S,SVAL,ALL $$ Output SxxxMx
    REPEAT/X,Y,Z,M,MVAL,ALL $$ with next motion
    ELSE
    DMY=POSTF(13)
    POSTN/OUT,G,91,A,28,Z,0
    ENDIF
    CIMFIL/OFF

    $$ ****************************************************
    $$ * E N D 08/21/01 *
    $$ ****************************************************

    14-Alexandrite
    March 27, 2014

    Jeff,

    I took a look at your fil file and it look like the informations you are looking for are handled by TLINFO macro. Here is what I suggest to do:

    In your PPRINT table (on the mfg model) activate the following options: TOOL_NAME, CUTTER_DIAM, LENGTH

    Edit the TLINFO macro on the fil file to look like this

    $$-------------------------------------------------------

    $$ Macro to find all PPRINT/TOOL NAME and LOADTL record

    $$ and save them in MACRO

    $$--------------------------------------------------------

    TLINFO=MACRO/

    CUCLPO=POSTF(7,1)

    T1=TEXT/'TOOL NAME'

    T2=TEXT/'LENGTH'

    T3=TEXT/'CUTTER_DIAM'

    TLINDX=1

    INDEX1=1

    INDEX2=1

    INDEX3=1

    $$

    DMY=POSTF(2,1,1836,1) $$ Suppress all warnings

    RESERV/TLNAME,100,TLNUMB,100,OFFSET,100,CYCFLG,100,TLLNGT,100,TLDIAM,100

    DMY=POSTF(2,1,1836,0) $$ Enable warnings

    $$

    DO/ENDDO2,BBB=1,100,1

    TLNAME(BBB)=TEXT/'NO TOOL NAME DEFINED IN NCL FILE'

    CYCFLG(BBB)=0

    ENDDO2)CONTIN

    $$

    DO/ENDDO1,AAA=1,3,1

    DMY=POSTF(14)

    WORD_2=POSTF(7,2)

    WORD_3=POSTF(7,3)

    IF(WORD_2 .NE. 14000)THEN

    CASE/WORD_3

    WHEN/(ICODEF(PPRINT))

    CALL/PRTCON

    OKTLCM=CMPRF(MESTYP,T1)

    IF(OKTLCM .EQ. 1)THEN

    TLNAME(TLINDX)=TEXT/MESCON

    TLINDX=TLINDX+1

    ENDIF

    OKTLCM=CMPRF(MESTYP,T2)

    IF(OKTLCM .EQ. 1)THEN

    TLLNGT(INDEX2)=TEXT/MESCON

    INDEX2=INDEX2+1

    ENDIF

    OKTLCM=CMPRF(MESTYP,T3)

    IF(OKTLCM .EQ. 1)THEN

    TLDIAM(INDEX3)=TEXT/MESCON

    INDEX3=INDEX3+1

    ENDIF

    WHEN/(ICODEF(LOADTL))

    TOOLNB=POSTF(7,4) $$ Get tool info.

    FIVWOD=POSTF(7,5)

    SIXWOD=POSTF(7,6)

    TLNUMB(INDEX1)=TOOLNB

    IF(FIVWOD .EQ. ICODEF(OSETNO))THEN $$ If offset # exist

    OFFSET(INDEX1)=SIXWOD

    ELSE $$ No offset #, use tool # instead

    OFFSET(INDEX1)=TOOLNB

    ENDIF

    INDEX1=INDEX1+1

    WHEN/(ICODEF(CYCLE)) $$ Check if a CYCLE is used for

    CYCFLG(INDEX1-1)=1 $$ this tool

    ENDCAS

    AAA=2

    ELSE

    AAA=4

    DMY=POSTF(15,(CUCLPO+1))

    ENDIF

    ENDDO1)CONTIN

    TERMAC

    Edit the MACHIN section:

    CIMFIL/ON, MACHIN

    DMY=POSTF(13)

    SEQNO/OFF

    INSERT/'(PROGRAM NAME - ',PTNUMB, ' )$'

    CALL/TIMDAT

    INSERT/'(DATE, DAY-MONTH-YEAR - ',DATE,'-',MONTH,'-',YEAR,' )$'

    $$

    CALL/TLINFO

    DO/ENDDO3,CCC=1,(TLINDX-1),1

    INSERT/'( TOOL:',TLNUMB(CCC), ' TOOL_DIA:', TLDIAM(CCC), $

    ' OFFSET:' OFFSET(CCC), ' LENGTH:', TLLNGT(CCC), $

    ' ', TLNAME(CCC),' )$'

    ENDDO3)CONTIN

    INSERT/' $'

    SEQNO/ON

    INSERT/' G00 G40 G49 G80 G90$'

    SEQNO/30,INCR,5,1

    CIMFIL/OFF

    After I made those changes the header of the tape file looks like this:

    G20

    (PROGRAM NAME - TEST_MFG )

    (DATE, DAY-MONTH-YEAR - 27-03-14 )

    ( TOOL: 4 TOOL_DIA:0.393701 OFFSET: 4 LENGTH:3.937010 T0004 )

    ( TOOL: 7 TOOL_DIA:0.312500 OFFSET: 7 LENGTH:3.000000 T0007 )

    14-Alexandrite
    March 28, 2014

    Jeff,

    If you look in your working directory with windows explorer you will find there one or more files that have ncl extension. Something like this: op010.ncl.8. Open the latest file of this type with wordpad or notepad and look for the line that begin with LOADTL word.

    The lines above should look like this:

    PPRINT / TOOL NAME : T0004

    PPRINT / CUTTER_DIAM : 0.393701

    PPRINT / LENGTH : 3.937008

    LOADTL / 4 $$-> 10 mm Dia; 3 mm Rad

    If you don't see the PPRINT lines above the LOADTL then your problem is with the PPRINT settings. If the lines are there but you don't get the tool list on the tape file, then the issue is with the postprocessor

    4-Participant
    October 30, 2025

    Also make sure you have DISPLY/ON either in your cl file source code or in your FIL.  Otherwise PPRINT's will not be output to the NC file.  (This is actually per the APT standard, which nearly every other post-processor gets wrong.)  PPRINT's are converted to look like this (when DISPLY/ON is active)

     

    DISPLY/NEXT

    PPRINTblahblahblah

     

    Otherwise, you would have to type DISPLY/NEXT before every PPRINT to have it output to NC file.

     

    On another note:  You guys might find this useful.  I compiled this using FreeBasic.  I use it to help build my setup sheets or for quick reference for customer before I have completed my runbook (using visual basic).  I always have a line after each load tool with "SEQ" giving a description of what the tool is doing.  For example:

    LOADTL/2,ADJUST,2,LENGTH, 7.815000
    DISPLY****************** SEQ10 *******************
    DISPLYROUGHING +.050
    DISPLYFINISH ALL ACCESSIBLE FEATURES
    DISPLY********************************************

     

    So, this program extracts this code.  Feel free to modify or remove.  I realize that everything I am doing could be done with G-POST, but I prefer to relieve the burden on G-post for faster post-processing.  G-POST is able to send/receive from external files and executables/batch programs, etc, so one could always use another program to scan/build tool lists, get run times, distance calc's, etc, prior to running the post....this is how I used to do it in the days of FORTRAN.  I still do this with G-POST for LIMITS, and RUNTIME because I already had FORTRAN programs that I trust for these functions, run faster, and are more accurate.  The output from these utilities can be called and inserted by FIL and/or attached to CIMPRO buttons (what I do).

     

    At any rate, this should give some creative ideas of what can be done...

     

    '*********************************************************************
    'SetupSheetHelper Main Program
    'Bryan Felsher 							 01-03-10
    'Modified 10-17-2025 BCF for AUSTIN NC G-POST
    '*********************************************************************
    Dim Shared As Integer i=0,n=0,iTLNUM,SEQNUM=0,iPRNUM
    Dim Shared As Integer FILTYP = 0, FREAD = 0
    Dim Shared As String sLNIN, sLNIN2, sNLINE,sTIME, sINFNM, sOFLNM,sLNOUT
    Dim Shared As String sTOOL(150)
    sLNIN=""
    sNLINE=""
    sLNIN2=""
    
    Declare Sub FILOPN
    Declare Sub SETTML
    Declare Sub HEADER
    Declare Sub TLLIST
    Declare Sub NCOUT
    
    Declare Function APTMAJ(LINEIN As String) As String
    '*********************************************************************
    
    Screen 10
    
    'SETTML
    
    FILOPN
    
    If InStr(UCase(sINFNM),".APT") < 1 Then 
     Print _
     "ERROR: INVALID FILE TYPE. MUST BE .APT OR .APTSOURCE FILE TYPE."
     Beep:Sleep:End
    EndIf 	
    	
    
    'BUILD TOOL LIST
    iTLNUM = 0
    Do While Not Eof(1)
     Line Input #1, sLNIN
     sLNIN=UCase(sLNIN)			
     If APTMAJ(sLNIN) = "PPRI" Then
     Line Input #1, sLNIN2 'READ NEXT LINE
     If Instr(sLNIN2,"LOADTL") >0 Then
     iTLNUM += 1
     sTOOL(iTLNUM) = LTrim(sLNIN,"PPRINT")
     sTOOL(iTLNUM) = LTrim(sTOOL(iTLNUM),"/")
     sTOOL(iTLNUM) = Trim(sTOOL(iTLNUM))
     EndIf
     EndIf
    Loop
    
    Reset
    FILOPN
    HEADER
    
    Do While Not Eof(1) 
     Line Input #1, sLNIN
     sLNIN=UCase(sLNIN)
     Select Case APTMAJ(sLNIN)
     Case "PART"
     iPRNUM = Val(LTrim(sLNIN,"PARTNO"))
     sLNOUT = "PROGRAM NUMBER: " & Str(iPRNUM)
     NCOUT
     Print #3, " "
     Case "FROM"
     TLLIST
     FREAD = 1
     Case "DISP", "PPRI"
     If APTMAJ(sLNIN) = "DISP" Then sLNOUT = LTrim(sLNIN,"DISPLY")
     If APTMAJ(sLNIN) = "PPRI" Then sLNOUT = LTrim(sLNIN,"PPRINT")
     sLNOUT = LTrim(sLNOUT, "/") 
    'Remove CATIA comment lines
     If InStr(sLNOUT,"OPERATION NAME") Then sLNOUT = ""
     If SLNOUT = _
     "********************************************" _
     Then sLNOUT = "" 
    'Remove tool description lines, handled later. 
     For i = 1 To iTLNUM Step 1
     If Instr(sLNOUT, sTOOL(i)) > 0 Then
     sLNOUT = "" 
     End If
     Next 
    'Check for sequence of operations notes 
     If FREAD = 1 Then 'Handle comments after FROM read
     If InStr(sLNOUT,"SEQ") Then
     SEQNUM+=1
     Print #3, sLNOUT
     sLNOUT = ""
     Print #3, STOOL(SEQNUM)
     End If
     End If
     NCOUT
     End Select
    Loop
    Print #3, "************** END OF PROGRAM **************"
    
    Reset 
    Beep	
    
    Function APTMAJ(LINEIN As String) As String
    	Dim As String MAJOR
    	MAJOR = Left(LINEIN,4)
    	Return MAJOR 
    End Function
    
    Sub FILOPN
    	ChDir ExePath
    	sINFNM = Command(1)
    	sOFLNM = Left(sINFNM,(InStrRev(sINFNM, ".")-1)) & "_SetupSheet.txt"
    	Dim choice As String
    
    		If Len(sINFNM)=0 Then
    		 Print "Missing parameter : No Input file!"
    			Input "Select file for input? [Y,N] ";choice
    			choice=LCase(choice)
    			If choice = Chr(121) Then 
    				Input "Enter Filename for Input: ";sINFNM
    				sOFLNM = Left(sINFNM,(InStrRev(sINFNM, ".")-1))_
     & "_RunTime.log"
    			Else 
    				End
    			End If
    			
    			If Open (sINFNM For Input As #1) <> 0 Then 
    	 			Print "Error: can't open Input File!"
    	 			Sleep:End
    			Else
    				If Open (sOFLNM For Output As #3) <> 0 Then
    				 Print "Error: can't open Output File!"
    				 Close #1
    				 Close #3
    				 End
    				end If	
    			End If 
    		Else
    				If Open (sINFNM For Input As #1) <> 0 Then 
    				 Print "Error: can't open Input File!"
    				 End
    				Else		
    					If Open (sOFLNM For Output As #3) <> 0 Then
    					 Print "Error: can't open Output File!"
    					 Close #1
    					 Close #3
    					 End
    					end If
    				End If		
    		End If
    	Return
    	
    End Sub
    
    Sub SETTML
    	Dim As String TimeLimit = "12-22-2010"
    	Print "Today's date is: ";Date;_
     ". You have until ";TimeLimit;" to try this software."
    	Print
    	Print "Press any key to continue."
    	Sleep:GetKey
    	If Date > TimeLimit Then
    		Print "Time limit ";TimeLimit;" has expired."
    		Sleep:End
    	EndIf
    	Cls	
    End Sub
    
    Sub HEADER
    	Print #3, "******************************************"
    	Print #3, "True Precision CNC Programming Services"
    	Print #3, "Ph: 310-750-6761"
     Print #3, "Email: trueprecisioncnc@outlook.com"
    	Print #3, "Website: www.trueprecisioncnc.com"
    	Print #3, "******************************************"
    	Print #3, " "
    	Print #3, "Setup Sheet Comments extracted from : "
     Print #3, sINFNM
    	Print #3, " "
    	Return 
    End Sub
    
    Sub TLLIST
     Print #3, ""
    	Print #3, "*****************TOOL LIST******************"
    	For i = 1 To iTLNUM Step 1
    		Print #3, sTOOL(i)
    	Next
     Print #3, "********************************************"
     Print #3, ""
     Print #3, "***********SEQUENCE OF OPERATIONS***********"	
     Print #3, ""
    	i=0
     Return 
    End Sub
    
    Sub NCOUT
     If sLNOUT <> "" Then
     Print #3, Trim(sLNOUT)
     sLNOUT = ""
     sLNIN = ""
     sLNIN2 = ""
     EndIf
     Return
    End Sub