0 BEGIN PGM 9040_EN MM 1 ;NC program for automatically finding the file 2 ;name and engraving it onto the workpiece 3 ;through a cycle. 4 ;With a string function with the 5 ;corresponding ID, the control reads out the 6 ;program path and saves it in QS1. Then it 7 ;calls a futher program, in which it selects 8 ;the file name from the path. It transfers 9 ;the file name again in the string parameter 10 ;QS1 to the calling program. There it uses it 11 ;as an engraving text in Cycle 225. 12 ;If the files being used are not in the same 13 ;directorz, you have to adapt the path data 14 ;in the call! 15 ; 16 BLK FORM 0.1 Z X+0 Y+0 Z-20 17 BLK FORM 0.2 X+100 Y+100 Z+0 18 ; 19 ;Tool Call engraving tool 20 TOOL CALL 151 Z S25000 21 ; 22 ;Retract 23 L Z+100 R0 FMAX M3 24 ; 25 ;Use ID10010 NR1 to read out the file path 26 ;and save QS1 27 QS1 = SYSSTR( ID10010 NR1 ) 28 ; 29 ;Call a program for forming the text string 30 CALL PGM 90401_en.H 31 ; 32 ;Engrave the file name contained in QS1 33 CYCL DEF 225 ENGRAVING ~ QS500= QS1 ;ENGRAVING TEXT ~ Q513=+8 ;CHARACTER HEIGHT ~ Q514=+0 ;SPACE FACTOR ~ Q515=+0 ;FONT ~ Q516=+0 ;TEXT ARRANGEMENT ~ Q374=+0 ;ANGLE OF ROTATION ~ Q517=+50 ;CIRCLE RADIUS ~ Q207=+2000 ;FEED RATE FOR MILLNG ~ Q201=-0.1 ;DEPTH ~ Q206=+150 ;FEED RATE FOR PLNGNG ~ Q200=+2 ;SET-UP CLEARANCE ~ Q203=+0 ;SURFACE COORDINATE ~ Q204=+50 ;2ND SET-UP CLEARANCE 34 ;Call cycle at starting point 35 L X+20 Y+40 R0 FMAX M99 36 ; 37 ;Retract 38 L Z+100 R0 FMAX 39 ; 40 ;End of program 41 M30 42 END PGM 9040_EN MM