the thing :
Code:
OS000 ( pulling bars on the turret )
V1 = 0.3 ( Z position for last frontal cut )
V2 = 0.4 ( frontal cut width / how thick is the salami slice )
V3 = 3 ( how many slices is desired to be cut >= 1 )
V4 = 2 ( number of tries >= 1 ) (*1)
V5 = 11 ( T - tool )
V6 = -123 ( X contact )
( * ) ( LV01 , LV02 , LV03 : used lower )
( IF [ VRSTT NE 0 ] NEND ) ( this remains in paranthesis; this code will never be restarted )
( M867 ) ( no shortening restart sequence )
G00 X+LVXP-VETFX Z150-VETFZ
T+V5*101 M66
VTOFX [ VETLN+20 ] = VTOFX [ VETLN ] ( 2nd offset )
V4 = V1 + V2 * V3 * V4 ( Z contact maxim )
V7 = V4 + 5 ( Z start G22 = Z contact maxim + 5 ) (*2)
V8 = V1 + V2 * V3 ( Z contact minim )
V9 = 2.5 + VTOFZ [ VETLN ] - VTOFZ [ VETLN + 20 ] ( retreat after torque skip ) (*3)
CALL OSG
CALL OZCHK
CALL OQ000
( NEND )
RTS
( . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . )
OSG ( senseless gauging )
G00 X+V6 Z+V4+2.5 ( Z contact maxim + 2.5 )
M19 T+VETLN+20
G01 X+VSIOX Z+V4 F2000 G94
M0
( Z+V7+5 ) (*4)
Z+V7
G29 PZ=60
G22 PZ=25 Z-V7 F+100*5 G94 D+V7*2 ( L0 still going ) (*5)
G28
RTS
( . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . )
OZCHK ( origin Z axis check )
G00 Z=VSIOZ+V9 M18
CALL OSGL
IF [ [ [ VSIOZ-V9 GE V8 ] AND [ VSIOZ-V9 LE V4 ] ] EQ 1 ] NJUMP
NRPT M0 ( out of bounds )
GOTO NRPT
NJUMP VSZOZ=VSZOZ+VSIOZ-V9-V8
T = VETLN ( Z = Z contact minim + 2.5 )
NEND
RTS
( . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . )
OSGL ( senseless gauging log )
FWRITC contact-1.txt;A
LV01 = VSIOZ-V9
LV02 = VSZOZ+LV01-V8
PUT ' '
PUT VSZOZ ( origin before contact )
PUT ' '
PUT LV01 ( contact )
PUT ' '
PUT LV02 ( origin after contact )
WRITE C
CLOSE C
RTS
( . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . )
OQ000 ( straight face )
V21 = 1900 ( n )
V22 = 0.15 ( f )
V23 = 35 ( X start )
V24 = -2*0.8 ( X end ) ( *r )
( * )
G97 S=V21 M42 M03 M08 G00 X+V23 Z=VSIOZ M63
NAGAIN V3=V3-1
Z+V1+V2*V3
G01 X+V24 F+V22 G95
Z+VSIOZ+0.3
IF [ V3 EQ 0 ] NBREAK
G00 X+V23
GOTO NAGAIN
NBREAK G00 X+LVXP-VETFX Z150-VETFZ M05 M63 M09
RTS
( . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . )
(*1)
( Z contact minim = V1+V2 )
( Z contact maxim - Z contact minim : multiple of salami slice )
(*2)
( 5 is minimal recomended distance, so torque skip will work )
( Monitoring is invalid if : [APPROACH] <= [WORK POSITION]+[+OK]+2mm )
( Monitoring is effective if : [APPROACH] >= [WORK POSITION]+[+OK]+[CENTER HOLE]+5mm )
(*3)
( while 2nd offset is active, turret is moving at a position specific to 1st offset )
(*4)
( eliminates backlash effort )
( to be used if this effort is big and may lead to wrong results )
Code:
105.555 2.512 106.967
105.555 1.752 106.207
105.555 1.353 105.808
105.555 1.26 105.715
105.555 2.502 106.957
105.555 1.953 106.408
105.555 1.779 106.234
105.555 2.259 106.714
105.555 2.378 106.833
105.555 2.592 107.047
105.555 2.514 106.969
105.555 2.673 107.128
105.555 2.206 106.661
105.555 1.9 106.355
105.555 2.247 106.702
105.555 2.593 107.048
105.555 2.687 107.142
105.555 2.633 107.088
105.555 2.259 106.714
105.555 2.273 106.728
105.555 2.044 106.499
105.555 1.873 106.328
105.555 2.647 107.102
105.555 2.246 106.701
105.555 2.153 106.608
105.555 1.833 106.288
105.555 2.366 106.821
105.555 2.14 106.595
105.555 2.206 106.661
105.555 2.406 106.861
105.555 2.3 106.755
105.555 2.273 106.728
105.555 2.593 107.048
105.555 2.139 106.594
105.555 2.046 106.501
105.555 1.766 106.221
105.555 2.006 106.461
105.555 2.687 107.142
105.555 2.419 106.874
105.555 2.472 106.927
105.555 2.526 106.981
105.555 2.206 106.661
105.555 1.633 106.088
105.555 2.166 106.621