Machsupport Forum
Mach Discussion => Mach4 General Discussion => Topic started by: blighty on September 19, 2025, 06:37:52 PM
-
Hi All,
I've been playing around with the demo, and I've come across a problem. it looks like g90 and g91 doesn't work. It will display "unknown G-code"
if this is the case, and it doesn't support g90, g91 how do you change from absolute to incremental and back again?
Asking as i need g91 in a macro im doing.
-
Although Mach3 turn did allow for G90/G91 the software developers of Mach4 turn did not consider it to be necessary except for instance when peck drilling.
Their solution for this is described in Chapters 4 & 5 of the Programming Guide which is here; https://www.machsupport.com/wp-content/uploads/2014/05/Lathe%20GCode%20Programming.pdf
I have never used Mach4 turn so cannot confirm if the switching between Absolute / Incremental and back again actually works correctly but you may wish to give this a try.
Tweakie.
-
Found the answer, they now use U, V and W for incremental moves. W=Z, V=Y and U=X so....
g0 g91 X-10 is now...
g0 U-10.
what i was trying to do is now up and running. Im now trying how to figure out how to update X,Z offsets in the tool table from a probe touch.
-
Mach4 control software emulates the Fanuc 20 series controls. Fanuc implemented incremental movement differently for lathes than for mills, routers and other non-lathe machines. It was Fanuc who came up with the convention to use U, V, W, and H (yes H) for incremental moves on a lathe's X, Y, Z, and C axes.
G90 and G91 (without the .1) are not valid on Fanuc 20 lathe controls, but do work as expected for non-lathe Fanuc 20 controls. Mach4 follows this convention.
It would be nice if the lathe programming documentation elaborated on the need to use U,V,W,H for incremental instead of G90/G91 when you look up G90/G91 in the Mach4 lathe programming documentation.
-
Hi Steve,
as you say, not much in the manual. I got the U V W. from a YT vid I was watching. The first thing he said was. "mach4 isn't like mach3 for starters it uses U and W for incremental move instead of g91."
Thanks for the Fanuc 20 reference. Should be able to find a PP now. As the one I have puts g90 and g91 all over the place.
-
Hi Tweakie,
thats where i found it after the YT vid
"U, V, W, H Incremental movement commands followed by a numerical value, define the
distance and direction to the end point of a motion command."