help with conditions in variable g-code
-
I have this:
G1 X110 Y-100 Z5 F9000 M400 G31 P{sensors.probes[0].value[0] + 8} G30 P4 X110 Y-100 Z-9999 if result != 0 echo "ERROR P4" continue echo "DONE P4"
so nothing special, go, probe, if successful print done, if not print error ... simple enough but .. output:
4/10/2020, 12:30:58 PM Error: Z probe already triggered at start of probing move DONE P4
So G30 produced Error, RRF knows there's an error and yet the "result" is 0 ?! like the probing went ok ? (3.01RC6)
What am I doing wrong?
-
@arhi said in help with conditions in variable g-code:
So G30 produced Error
What error did it report?
-
@dc42 you see the error just before the DONE:
Error: Z probe already triggered at start of probing move
-
I would say that the firmware, having sensed that the probe is already triggered is (correctly) bailing out of the procedure to head off any possible damage,
-
@OwenD that is ok, the movement behavior is ok, but the return value is 0 and 0 means "ok", not "error"
-
It's a bug, which will be fixed in 3.01-RC7. Thanks for reporting it.
-
Good, I'm not going crazy then
-
@dc42 btw it returns zero in event of other error too (not triggered after a while)
-
Error: Probe points P0 to P3 must be in clockwise order starting near minimum X and Y, and P4 must be near the centre
this error does not return 0 (after doing
G30 P24 X110 Y100 Z-9999 S0
all the other ones were withoutS
parameter)