Trying to understand gcode

When I start a job. The router moves to the position to start cutting. It did this by basically sending the following code.
G21
G90
G0X0.000Y0.000Z10.008
If I try to send these codes thru the MDI. It does not seem to work like I think it should.

What am I doing wrong?

Did you set the zero point on the job?

G21 (Metric)
G90 (Absolute Programming. As opposed to Incremental)
G0X0.000Y0.000Z10.008 (Move axes. measured from wherever they think zero is.)

1 Like

This is the start of the gcode in the loaded file.
%
(TOOL/MILL,0.1,0.05,0.000,0)
(FILENAME: )
()
G21
G90
G0X0.00Y0.00Z6.35

If the router is in the home position it moves to the start point of the job. Shouldn’t entering the same code thru the mdi interface do the same thing?

If you are using Carbide Motion, be aware that it filters/manages some of the Gcode commands behind the scenes (for your own good, but that can lead to some headscratching when using manual MDI commands)

Try prepending a forward slash before each command e.g. “/G21”, this tells CM to pass the command straight through to the controller without any filtering/hidden logic.

2 Likes

Sorry I should have put the forward slash in the post. Because I did put the forward slash in the commands I used in carbide motion. I think I will try to get a log of the commands that get sent when carbide motion starts a job.
Thanks for the response.

After some more testing. I found that carbide motion sends
N6G0X-321.6250Y-288.3750Z-19.6750 This is the start point of the job.
I don’t see the G21 G90 and G0X0.000 Y.000 Z6.350. I finally realized that all moves of the router are based on the home position being in the upper right corner. When you setup a zero position. The machine remembers it based from the upper right. When your program runs the movements are in real machine movements. Carbide motion adds your program movement to the saved machine position. Now I understand why the G0X0.000Y0.000Z6.350 didn’t work. I also think That some commands in your program don’t show up in the log because Carbide motion executes them and they don’t get sent to the machine.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.