Automatische Höhenmessung

Mittels „Probe“ Input kann auch ein 3D Model erstellt werden. Dazu benötigt man eine „Probe“, also einen Messfühler, der durch Antasten die Struktur eines Objektes erstellen kann.

Damit der Taster auch benutzt werden kann muss in der „standard_pinout.hal“ der entsprechende Pin aktiviert sein.

net probe parport.0.pin-15-in => motion.probe-input

Hier ist die nötige G-Code-Datei, als kleine Abwandlung vom Bespielprogramm „gridprobe“.

( Rectangular Probing                                                   )
( This program repeatedly probes in a regular XY grid and writes the    )
( probed location to the file 'probe-results.txt' in the same directory )
( as the .ini file                                                      )
(Configuration section)
G21   (mm)
F500    (probe speed)
#1=0  (X start)
#2=5 (X increment)
#3=15 (X count)
#4=0
#5=5
#6=15 (Y count)
#7=26 (Z safety)
#8=-5 (Z probe)
(End configuration section)
(LOGOPEN,probe-results.ngc)
#9=0 #10=0
G0Z#7
O1 while [#9 lt #6]
   #10=0
   G0 Y[#4+#5*#9]
   O2 while [#10 lt #3]
       O3 if [[#9/2] - fix[#9/2] eq 0]
           G0X[#1+#2*#10]
       O3 else      
           G0X[#1+#2*[#3-#10-1]]
       O3 endif
       G38.2Z#8
       G0Z#7
       (LOG,G1 X#5061 Y#5062 Z#5063)
       #10=[#10+1]
   O2 endwhile
   #9=[#9+1]
O1 endwhile
(LOGCLOSE)
G0Z#7
G0X#1Y#4
M2

Beispiel Ausgabe

Hier die (teilweise) dadurch erstellte Ausgabedatei:

G1 X0.000000 Y0.000000 Z17.210442
G1 X4.999999 Y0.000000 Z17.116393
G1 X9.999999 Y0.000000 Z2.132236
G1 X14.999999 Y0.000000 Z1.111123
G1 X19.999999 Y0.000000 Z0.886075
G1 X24.999999 Y0.000000 Z0.798743
G1 X29.999999 Y0.000000 Z0.603926
G1 X34.999999 Y0.000000 Z0.392314
G1 X39.999999 Y0.000000 Z0.392314
G1 X44.999999 Y0.000000 Z0.331853
G1 X49.999999 Y0.000000 Z0.184061
G1 X54.999999 Y0.000000 Z0.543465
G1 X59.999999 Y0.000000 Z1.232045
G1 X64.999999 Y0.000000 Z17.106316
G1 X69.999999 Y0.000000 Z17.119752
G1 X69.999999 Y4.999999 Z17.375030
G1 X65.000001 Y4.999999 Z1.067457
G1 X60.000001 Y4.999999 Z-0.054423
G1 X55.000001 Y4.999999 Z0.032909
G1 X50.000001 Y4.999999 Z-0.326496
G1 X45.000001 Y4.999999 Z0.227727
G1 X40.000001 Y4.999999 Z0.439339
G1 X35.000001 Y4.999999 Z0.603926
G1 X30.000001 Y4.999999 Z0.724847
G1 X25.000001 Y4.999999 Z0.768513
G1 X20.000001 Y4.999999 Z0.483005
G1 X15.000001 Y4.999999 Z0.842409
G1 X10.000001 Y4.999999 Z1.188379
G1 X5.000001 Y4.999999 Z1.655269
G1 X0.000001 Y4.999999 Z17.344799
G1 X0.000001 Y9.999999 Z17.459003
G1 X4.999999 Y9.999999 Z1.413427
G1 X9.999999 Y9.999999 Z17.173494
G1 X14.999999 Y9.999999 Z1.218609
G1 X19.999999 Y9.999999 Z1.067457
G1 X24.999999 Y9.999999 Z1.473887
G1 X29.999999 Y9.999999 Z1.950855
G1 X34.999999 Y9.999999 Z1.944137
G1 X39.999999 Y9.999999 Z24.102953
G1 X44.999999 Y9.999999 Z4.110642
G1 X49.999999 Y9.999999 Z0.264675
G1 X54.999999 Y9.999999 Z18.762265
G1 X59.999999 Y9.999999 Z-0.403751
G1 X64.999999 Y9.999999 Z-0.192139
G1 X69.999999 Y9.999999 Z1.020432
G1 X69.999999 Y14.999999 Z-0.326496
G1 X65.000001 Y14.999999 Z-0.521313
G1 X60.000001 Y14.999999 Z-0.252599
G1 X55.000001 Y14.999999 Z0.076575
G1 X50.000001 Y14.999999 Z1.057381
G1 X45.000001 Y14.999999 Z17.821766
G1 X40.000001 Y14.999999 Z17.942688
G1 X35.000001 Y14.999999 Z17.912457
G1 X30.000001 Y14.999999 Z17.868791
G1 X25.000001 Y14.999999 Z17.791536
G1 X20.000001 Y14.999999 Z17.492592
G1 X15.000001 Y14.999999 Z1.937419
G1 X10.000001 Y14.999999 Z1.420145
G1 X5.000001 Y14.999999 Z1.054022
G1 X0.000001 Y14.999999 Z1.547784