0 BEGIN PGM 8130-EN MM 1 ;Workpiece counter 2 ;When beginning the program, define the 3 ;desired number of repetitions. 4 ;At program start, the number of runs so 5 ;far is displayed on the screen. When the 6 ;programmed number is reached, this is also 7 ;reported and the counter is reset to zero. 8 ; 9 ; 10 ;Entry of desired repetitions 11 QR2 = 8 ;NUMBER OF REPETITIONS 12 ; 13 ;Display the number of repetitions so far 14 FN 16: F-PRINT TNC:\Database\81301-en.a / Screen: 15 ; 16 QR1 = QR1 + 1 ;Increment the counter 17 ; 18 ; 19 ;Perform the required machining operation, 20 ;possibly with PGM CALL; the called program 21 ;cannot contain M2 or M30 in this case. 22 CALL PGM TNC:\Database\81303-en.h 23 STOP 24 ; 25 ; 26 ;Compare whether the number of repetitions 27 ;has been reached. 28 FN 12: IF +QR1 LT +QR2 GOTO LBL 99 29 ;Display that the number of repetitions has 30 ;been reached. 31 FN 16: F-PRINT TNC:\Database\81302-en.a / Screen: 32 ; 33 QR1 = 0 ;Reset the counter 34 QR2 = 0 ;Reset the desired repetitions 35 ; 36 ;End of program 37 M30 38 ; 39 ;Jump label in case further repetitions are 40 ;necessary 41 LBL 99 42 ;End of program 43 M30 44 END PGM 8130-EN MM