Quote Originally Posted by stevensturgis View Post
It sounds like your g code and mach3 set ups are not both in mm or in inches.The cnc must be set up to one or the other at the start of loading mach3 for the motor travel set up. you cant change g code by using select native units. under configuration tab. That is for setting motor controls for the cnc only.
In mesh cam set zero to top of stock. use the real thickness of the stock you will use. set the mm or inches in the mesh cam tab marked define stock this should be set to what you what to work in mm or inches. mesh cam will set the g code to mm or inches by g code commands for mach3.automatically

The tool zero must also match the units your working in i think this is the problem. you can edit the tool zero text in windows note pad the thickness of your plate is set in this code change it to the thickness of your zero plate.

also. g70 is inches and g71 is mm. g 20 or g21 will set mach3 to the working units.look at the g code and see what mesh cam is using

. if you zero the tool and then hit go to zero in mach3 the tool should go to the top of your stock. if it dosent the tool zero code is wrong. or there is a tool offset being used tool offsets are set in the native units you picked when loading mach3. to view hit config tab then tool table.

In mach3 hit the tab operator than edit text bottom the screen will blink then hit tool zero button this will bring up the code its using so you can compare them. there is also a tool retract height in this code.

sample code only for reference or comparing to yours.

CurrentFeed = GetOemDRO(818) 'Get the current feedrate to return to later
CurrentAbsInc = GetOemLED(48) 'Get the current G90/G91 state
CurrentGmode = GetOemDRO(819) 'Get the current G0/G1 state


If GetOemLed (825)=0 Then 'Check to see if the probe is already grounded or faulty
DoOEMButton (1010) 'zero the Z axis so the probe move will start from here
Code "G4 P3" ' this delay gives me time to get from computer to hold probe in place
Code "G90 G31Z-4. F4" 'probing move, can set the feed rate here as well as how far to move
While IsMoving() 'wait while it happens
Wend
ZProbePos = GetVar(2002) 'get the exact point the probe was hit
Code "G0 Z" &ZProbePos 'go back to that point, always a very small amount of overrun
While IsMoving ()
Wend
Call SetDro (2, .246) ' change .060 to your plate thickness and then adjust for final accuracy
Sleep 200 'Pause for Dro to update.
Code "G1 Z1. F50" 'put the Z retract height you want here, must be greater than the touch plate thickness
While IsMoving ()
Wend
Code "(Z axis is now zeroed)" 'puts this message in the status bar
Code "F" &CurrentFeed 'Returns to prior feed rate
Else
Code "(Z-Plate is grounded, check connection and try again)" 'this goes in the status bar if applicable
End If
If CurrentAbsInc = 0 Then 'if G91 was in effect before then return to it
Code "G91"
End If
If CurrentGMode = 0 Then 'if G0 was in effect before then return to it
Code "G0"
End If
this is a problem, im trying to cut it out of mdf as a practice but if i set the mdf thickness in 'define stock' which is 36mm, then i go to 'program zero' and hit 'top of stock' it says z 18.813 mm

so it wants to start half way through my material?