|
this is script for scanning surface by touch probe.You can modify the parameters in this file (#2038-#2047) to customize it. You can also add these parameters to the parameter file (such as eng) so that you can modify it on the parameter page.
scanning_surface.nc content:
O0001(Probe subroutine)
G90G0Z#2044
M101
G91G01Z-#2045F#2046
M102
G04P0
RecordCoords[#2047,#699,#700,#701,#702]
G90G0Z#2043
M99
O0000
#2038=5;Steps every
#2039=0;X-axis start at
#2040=0;Y-axis start at
#2041=100;X-axis end at
#2042=50;Y-axis end at
#2043=3;Clearance height
#2044=0.5;Start probing
#2045=1;Max probe distance
#2046=50robe feedrate
#2047=1;Record file serial number
ClearCoords[#2047]
G0Z#2043
G0X#2039Y#2040
IF [#2041-#2039]>=0 GOTO1
#1=-#2038
GOTO2
N1 #1=#2038
N2 IF [#2042-#2040]>=0 GOTO3
#2=-#2038
GOTO4
N3 #2=#2038
N4 #3=[#2041-#2039]/#1
#4=[#2042-#2040]/#2
#6=0
N5 #6=#6+1
#5=0
N6 #5=#5+1
M98P0001
IF #5>#3 GOTO7
G91G0X#1
GOTO6
N7 IF #6>#4 GOTO8
#1=-#1
G91G0Y#2
GOTO5
N8 G90G0X#2039Y#2040
M99
|
|