0 BEGIN PGM 8215_EN MM 1 ;NC program for measuring the program run 2 ;time and displaying it in a pop-up window 3 ;at program end. 4 ;The control reads out system time at program 5 ;start and program end, calculates the program 6 ;run time, and displays it by means of the 7 ;FN16 function in the form of a defined mask 8 ;file. 9 ; 10 BLK FORM 0.1 Z X+0 Y+0 Z-20 11 BLK FORM 0.2 X+100 Y+100 Z+0 12 ; 13 ;Export current system time in seconds to Q10 14 FN 18: SYSREAD Q10 = ID320 NR1 IDX0 15 ; 16 ;Machining 17 TOOL CALL 1 Z S20000 F1000 18 L X+0 Y+0 R0 FMAX M3 19 L Z-5 R0 FMAX 20 L X+0 Y+0 F50 21 L X+80 Y+20 22 L Y+80 23 L X+20 24 L X+0 Y+0 R0 25 L Z+100 R0 FMAX 26 ;End of machining 27 ; 28 ; 29 ;Calculate the program run time 30 FN 18: SYSREAD Q11 = ID320 NR1 IDX0 ;Export current system time to Q11 31 FN 2: Q12 =+Q11 - +Q10 ;Subtract system time at start from the system time at end 32 Q13 = Q12 / 3600 ;Calculation of the hours 33 Q30 = INT Q13 ;Turncate decimal places of the hours 34 Q14 = Q30 * 3600 ;Convert hours into seconds 35 Q15 = Q12 - Q14 ;Calculation of remaining seconds 36 Q16 = Q15 / 60 ;Calculation of minutes 37 Q31 = INT Q16 ;Turncate decimal places of the minutes 38 Q17 = Q31 * 60 ;Convert minutes to seconds 39 Q32 = Q15 - Q17 ;Calculation of the remaining seconds 40 ; 41 ;Display the program run time in form of the 42 ;defined mask file 43 FN 16: F-PRINT 82151_en.a / Screen: 44 ; 45 ;Program end 46 M30 47 END PGM 8215_EN MM