v0.8.7 Output appears to use Incorrect Mach3 Probe Var

Help for setting up and using
Post Reply
Brtdead
Posts: 17
Joined: Fri Feb 12, 2016 11:18 am

v0.8.7 Output appears to use Incorrect Mach3 Probe Var

Post by Brtdead »

I've been having a (way) too deep etch on v0.8.7. The o100 sub procedure is using var #502 as the return from the probe operation - according to the Mach3 documentation #2002 is filled with the Z value.
Altering to #2002 has anyway solved my basic problem, and the etch depth is much more as expected.

Code: Select all

O100 sub
	G0 Z2.0 (raise the tool above the board)
	M5 (make sure the spindle is stopped)
	M0 (pause for any probe wires to be attached)
	G0 X#500 Y#501 (move to X Y position)
	G31 Z-1.0 F50.0 (probe)
	G92 Z#502 (set Z to position)
	G0 Z2.0 (raise the tool above the board)
M99
daedelus
Site Admin
Posts: 387
Joined: Tue Oct 01, 2013 1:41 pm
Location: London, UK
Contact:

Re: v0.8.7 Output appears to use Incorrect Mach3 Probe Var

Post by daedelus »

The o100 sub procedure is using var #502 as the return from the probe operation - according to the Mach3 documentation #2002 is filled with the Z value.
Yes, but #502 should be assigned a value before the call to o100. Here is the complete listing...

Code: Select all

(This is the sub-procedure used for resetting the Z position)
(Refer to the log table above if it exists to reset Z to any of the log index's)
(Example usage...)
(#500 = 12.123)
(#501 = 45.567)
(#502 = -0.0123)
(M98 P100)
O100 sub
	G0 Z2.0 (raise the tool above the board)
	M5 (make sure the spindle is stopped)
	M0 (pause for any probe wires to be attached)
	G0 X#500 Y#501 (move to X Y position)
	G31 Z-1.0 F100.0 (probe)
	G92 Z#502 (set Z to position)
	G0 Z2.0 (raise the tool above the board)
M99
This is explained further in http://www.autoleveller.co.uk/autoleveller-guide/
The subs are there as an aid to recovery/resuming so you may not even need to use them if you do everything in one go. Also, the log table is only shown if you are using the raw probe file method. If you are not using the RPF you should not be using the subs at all.

Using #2002 here is dangerous because your Z position could be at any height when you call G92.
http://www.autoleveller.co.uk/. Software to probe and adjust a GCode file for PCB's or any probe-able surface.

http://www.autoleveller.co.uk/cnc-probe-guide/. A short guide to setting up the probe.

-James
Brtdead
Posts: 17
Joined: Fri Feb 12, 2016 11:18 am

Re: v0.8.7 Output appears to use Incorrect Mach3 Probe Var

Post by Brtdead »

Well I am using the RPF. Where I got confused, is that o100 is called when starting the RPF modified code. I can only assume that in that case #502 should be zero.

However the G31 moves the probe down until contact occurs, then retracts the probe slightly. How is that retraction taken into consideration?

Apologies if I'm way off the mark here, but something is going (very) wrong for me.
daedelus
Site Admin
Posts: 387
Joined: Tue Oct 01, 2013 1:41 pm
Location: London, UK
Contact:

Re: v0.8.7 Output appears to use Incorrect Mach3 Probe Var

Post by daedelus »

At the start, #502 should be set the the first Z in the probe table in the gcode file which should be close to 0 anyway.

Here is an example taken from the start of a file I have...

Code: Select all

(Set variables #500, #501, #502 to X Y and Z to be used by o100)
#500 = 0.0
#501 = 0.0
#502 = 0.00250
(Set Z before milling starts...)
M98 P100
M98 P200
As you can see #502 is set to 0.00250 which is the same as the Z of probe point 1 in the table of the same gcode file...

Code: Select all

(80 | 79 | 78 | 77 | 76 | 75 | 74 | 73 | 72 | 71)
(61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70)
(60 | 59 | 58 | 57 | 56 | 55 | 54 | 53 | 52 | 51)
(41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50)
(40 | 39 | 38 | 37 | 36 | 35 | 34 | 33 | 32 | 31)
(21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30)
(20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11)
(1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10)

(Match the "point order" with the XYZ position here)

(1  | X = 0.000000     Y = 0.000000     Z = 0.002500)
(2  | X = 53.447500    Y = 0.000000     Z = -0.062500)
(3  | X = 106.895000   Y = 0.000000     Z = -0.115000)
(4  | X = 160.342500   Y = 0.000000     Z = -0.205000)
(5  | X = 213.790000   Y = 0.000000     Z = -0.300000)
(6  | X = 267.237500   Y = 0.000000     Z = -0.390000)
(7  | X = 320.685000   Y = 0.000000     Z = -0.437500)
(8  | X = 374.132500   Y = 0.000000     Z = -0.480000)
(9  | X = 427.580000   Y = 0.000000     Z = -0.632500)
(10 | X = 481.027500   Y = 0.000000     Z = -0.775000)
(11 | X = 481.027500   Y = 54.432500    Z = -0.800000)
(12 | X = 427.580000   Y = 54.432500    Z = -0.710000)
(13 | X = 374.132500   Y = 54.432500    Z = -0.577500)
(14 | X = 320.685000   Y = 54.432500    Z = -0.550000)
(15 | X = 267.237500   Y = 54.432500    Z = -0.505000)
...
For your code, what is #502 set to? Can you paste the starting block where the subs are called here?

The retraction should be the probe clearance value you set in AL. By default this is 2mm.
http://www.autoleveller.co.uk/. Software to probe and adjust a GCode file for PCB's or any probe-able surface.

http://www.autoleveller.co.uk/cnc-probe-guide/. A short guide to setting up the probe.

-James
Brtdead
Posts: 17
Joined: Fri Feb 12, 2016 11:18 am

Re: v0.8.7 Output appears to use Incorrect Mach3 Probe Var

Post by Brtdead »

At the start, #502 should be set the the first Z in the probe table in the gcode file which should be close to 0 anyway.
Oh good grief - I missed that. Sorry.
The retraction should be the probe clearance value you set in AL. By default this is 2mm.
No, I meant the retraction that is carried out via G31. This seems to be less than 1um so it doesn't really matter.

Thankyou for your replies, again sorry I misunderstod.
Post Reply