0 BEGIN PGM 81902_EN MM 1 ;NC program with which a measuring cycle is 2 ;executed at the current tool position. This 3 ;may be necessary if the cycle is to be 4 ;executed with a cycle call at a specific 5 ;positions. For this purpose, you could 6 ;define this program in Cycle 12 and then 7 ;call it with CYCL CALL or M99. 8 ; 9 ;Wait for synchronization of NC and PLC to 10 ;ensure that the program run is not continued 11 ;until the position has been reached. 12 FN 20: WAIT FOR SYNC 13 ; 14 ;Read out the current position of the X axis 15 ;and save the value in Q1 16 FN 18: SYSREAD Q1 = ID270 NR1 IDX1 17 ; 18 ;Read out the current position of the Y axis 19 ;and save the value in Q2 20 FN 18: SYSREAD Q2 = ID270 NR1 IDX2 21 ; 22 ;Definition of the measuring cycle at the 23 ;current position 24 TCH PROBE 421 MEASURE HOLE ~ Q273=+Q1 ;CENTER IN 1ST AXIS ~ Q274=+Q2 ;CENTER IN 2ND AXIS ~ Q262=+25.2 ;NOMINAL DIAMETER ~ Q325=+0 ;STARTING ANGLE ~ Q247=+90 ;STEPPING ANGLE ~ Q261=-5 ;MEASURING HEIGHT ~ Q320=+0 ;SET-UP CLEARANCE ~ Q260=+20 ;CLEARANCE HEIGHT ~ Q301=+0 ;MOVE TO CLEARANCE ~ Q275=+0 ;MAXIMUM LIMIT ~ Q276=+0 ;MINIMUM LIMIT ~ Q279=+0 ;TOLERANCE 1ST CENTER ~ Q280=+0 ;TOLERANCE 2ND CENTER ~ Q281=+1 ;MEASURING LOG ~ Q309=+0 ;PGM STOP TOLERANCE ~ Q330=+0 ;TOOL ~ Q423=+4 ;NO. OF PROBE POINTS ~ Q365=+1 ;TYPE OF TRAVERSE 25 ; 26 ;Open the table to which the results are 27 ;to be written 28 FN 26: TABOPEN 81903_en.pnt 29 ; 30 ;Write the measured results to the table 31 FN 27: TABWRITE Q0 /"X" = Q151 32 FN 27: TABWRITE Q0 /"Y" = Q152 33 ; 34 ;Increment the counter 35 Q0 = Q0 + 1 36 END PGM 81902_EN MM