Hello, i have wrote a Program to Measure Tool lengths and automatically save the length in the tool table but i dont want the Program to execute if i have either 3D-Touchprobe, Calibration Tool or no Tool loaded. The first two work but when i have no tool loaded it just ignores the Parameter and executes the program (which should not happen because of possible crash hazard depending on how i design the machine)
this is my Program: //o<Werkzeug_Einmessen> sub g21 g90 g53 G0 G49 Z90 o100 if [#<_current_tool> EQ 0] (wenn Parameter "geladenes Werkzeug" gleich 0 "Kein Werkzeug" ist, Programm Stoppen) M2 (DEBUG, Werkzeug Einsetzen!) o100 endif o101 if [#<_current_tool> EQ 99] (wenn Parameter "geladenes Werkzeug" gleich 99 "Kalibrierdorn" ist, Programm Stoppen) M2 (DEBUG, Kalibrierdorn Entfernen!) o101 endif o102 if [#<_current_tool> EQ 100] (wenn Parameter "geladenes Werkzeug" gleich 100 "3D-Taster" ist, Programm Stoppen) M2 (DEBUG, 3D-Taster Entfernen!) o102 endif G59.3 (G10 L2 P9 oder G10 L20 P9) G0 A90 C0 G0 X52 Y21 (Position vom Werkzeuglängentaster - eventuell Z eingeben) (Werkzeug Einmessen) G0 G53 G38.2 Z-5 F1000 (Schnell Antasten) G91 G0 Z5 (Abheben nach Antasten) G90 G38.2 Z-5 F50 (Genaues Einmessen) G10 L10 P#<_current_tool> z[#1001-0.002426] G91 G0 Z10 (print,Werkzeug Nr. #<_current_tool> ist #5063 mm lang.) (DEBUG,Werkzeug Nr. #<_current_tool> ist #5063 mm lang.) G90 G53 G54 Z90 (Fertig) G0 A0 C0 //o<Werkzeug_Einmessen> endsub M2 is there any special Parameter or value i have to enter? The Parameter 5400 (the same as #<_current_tool>) in the Var file shows 0 when no tool loaded and 100 if i load tool 100. If i change the "0" to "1" and load tool 1 and hit execute, it stops. Another thing i ask myself is, why do i have to subtract a few microns (G10 L10 P#<_current_tool> z[#1001-0.002426]) if i split one value to the tooltable and the DEBUG message telling me how long the tool is? Should be the same value but they are not although they have the same source! I tried adding a dwell after the accurate measuring but that changed nothing :/ -- website: http://www.machinekit.io blog: http://blog.machinekit.io github: https://github.com/machinekit --- You received this message because you are subscribed to the Google Groups "Machinekit" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. Visit this group at https://groups.google.com/group/machinekit. For more options, visit https://groups.google.com/d/optout.
