Re: Help me understand probe code
"G31 Z3.337 F50.; [Move to Z3.337 at F50, and stop moving if you get a signal from probe that it's touched something]
#1=#5003; [Write current Z to variable #1]"
The G31 is kind of the heart of probing. It's basically a feed move, but looking for the probe to be tripped. When it hits something-- trips-- then the position is recorded in variables #5061-#5069 (for X,Y,Z, etc). If the probe doesn't hit anything, the final point of the G31 move is recorded in those variables. In the program you reference, the value of the skip signal (the trip) is put into the #1 variable, so that it doesn't accidentally change when the machine goes home. That's all probing is-- moving a really expensive switch (probe) until it gets tripped, then using the information about where it was when it got tripped.
Then, the IF statement evaluates if the value was what you were expecting to get with the probe. In those evaluations, you can use EQ (equal) , NE (not equal), GT (greater than), LT (less than), LE (less than or equal) or GE (greater than or equal). All that is is IF[What is in the brackets is true]then do this. If #1 doesn't equal 3.337, then Goto line 1. You can leave the THEN out, it is implied.
Does that help at all?
____________________________
My blog: http://www.fletch1.com