05-15-2025, 04:20 PM
I'm working on some machining projects and we are using G28 to safe move from one operation to another, but generated project works not as expected.
My home position configured in the application to X 0, Y 0, Z 200
And with the following g-code I expected that robot moves to home position, after that goes to Z 0 and draw part of a square, then on the line
it should relatively go up from the current position by Z200. but instead robot moves to X 0, Y 0, Z 400.
So in my opinion generator ignores intermediate point X 100, Y 0, Z 200 and instead adds 200 to the Z of the home position and moves there.
Here is the example of expected behavior
![[Image: g28-gcode.jpg]](https://gcodetutor.com/fanuc-training-course/img/g28-gcode.jpg)
Am I doing something wrong or it's expected behavior?
My home position configured in the application to X 0, Y 0, Z 200
And with the following g-code I expected that robot moves to home position, after that goes to Z 0 and draw part of a square, then on the line
Quote:G28 G91 Z200.
it should relatively go up from the current position by Z200. but instead robot moves to X 0, Y 0, Z 400.
Code:
G90
G28 G91 Z0
G90
G0 X0. Y0. Z0.
G0 Y100.
X100.
Y0.
G28 G91 Z200.
So in my opinion generator ignores intermediate point X 100, Y 0, Z 200 and instead adds 200 to the Z of the home position and moves there.
Here is the example of expected behavior
![[Image: g28-gcode.jpg]](https://gcodetutor.com/fanuc-training-course/img/g28-gcode.jpg)
Am I doing something wrong or it's expected behavior?