G38.2 - error handling
-
Hi there,
I´m using G38.2 to probe toward a workpiece.
In the case of an error the message is displayed.
How can I react to an error? In my case I want to stop the program, and show a custom message.
Maybe I want to retry the probing move, but in the end I need to abort the gcode.
Is there a way with conditional gcode or so?thanks for your help.
-
-
Thanks @Phaedrux
maybe this place is better -
@moosi
You can check the result of any standard G Code
https://docs.duet3d.com/User_manual/Reference/Gcode_meta_commandsresult int
0 if the last G-, M- or T-command on this input channel was successful, 1 if it returned a warning, 2 if it returned an error, or -1 if it was a blocking M291 message box command that had a Close button, and either the Close button was pressed or the message box timed out. Meta commands do not change 'result'.G38.2 if result > 0 abort "Probe failed. Job cancelled"
Would cancel the job and display a console message
-
@OwenD
thanks so much.
It is exactly what I was looking for.