X axis skewing too far

When I run the following gcode output from EstlCAM for a small test piece, after homing X and Y and setting Z to 0 manual at the top of the work piece and running G92 Z0, the project starts but the X axis moves well over to the right side of the machine, maybe to X300 or so, not to X21 as indicated in the first line of “No. 1 Hole…” below.

I successfully ran earlier iterations of EstlCAM outputs of the same piece as I figured out a few things in EstlCAM, but this was supposed to be the final demo run of the machine. The only thing I did differently was scale the drawing down 25% and played around with making tabs. I hadn’t changed any other settings.

This reads to me as if the machine should zero the axes, which it does, then move to X21, Y24. I think it gets the Y correct, but the X is way off. What could I be doing wrong?

G21
G90
G94
M03 S24000
G00 X0.0000 Y0.0000 Z0.0000 F2100
G00 Z2.0000 F480

(No. 1 Hole machining: Hole 6)
G00 X21.0602 Y24.5890 Z2.0000 F2100
G00 Z0.5000 F480
G01 Z0.0000 F180 S24000
G01 Z-3.0000 F180
G01 X26.3040 Y28.1642 F900
G02 X27.2192 Y28.0588 I0.4017 J-0.5386 F900
G03 X28.6734 Y26.7366 I9.6208 J9.1198 F900

etc.

Do you verify you zeroed your x axis correctly?
Also what controller are you using?. The dxf origin in estlcam is actually at x/y 0?

I’m using a Jackpot controller.

I run G21, G90 and G94 and then home each axis before I run any commands or project gcodes. The axes home correctly.

I’ve discovered that the problem isn’t with the project gcode. If I just send a G1 command to any of the axes I get a runaway. A G1 Y20 F200 command will race the head at max speed to the end stops and crash the machine. The X axes moves at what appears to be the F speed I set, but it will not stop. Same with the Z axes.

The jog wheel in Fluid NC works correctly with all axes. It’s only when I send G21 commands that I get the runaway behavior.

I did put the cover on the control box for the first time before this behavior started but I just pulled it off and all the cables are seated and look good, but the problem persists.

This is a behavior that was not occurring earlier this morning. It was behaving perfectly this morning.

You should setup Estlcam with the start, tool change, and ending gcode specified on the milling basics page.
https://docs.v1e.com/tools/milling-basics/?h=milling#gcode-start-tool-change-and-ending

This is the expecting starting code. I’m not sure where your code came from.

G21
G90
G94
G92 X0 Y0
M0 (MSG Attach probe)
G38.2 Z-110 F200 P0.5 (probe down set thickness )
G1 Z10 F900
M0 (MSG Remove probe)
M62 P1 (If used start spindle pin27 )

The G21 is not the problem. That just says to work in mm and not inches.

The jogging works fine because it’s doing an incremental G91 jog. So, that’s saying to move that distance from the current position. Normally, you do moves in G90 which is based on the workspace. So, when you say move G0 or G1 X10, that’s not saying to move 10 mm, that’s saying move to X10.

So, the short of this is that you probably just need to home your machine first. If you didn’t home first, this line could cause some major grief:
G00 X0.0000 Y0.0000 Z0.0000 F2100

Thanks for the help. That code came directly from EstlCAM, but it is not the problem. I get runaways on each axis without running any project gcode, just manually entering G1 … in the FluidNC UI. There is no project running, though it was after trying to run a project gcode that I first experienced the problem.

The machine homes correctly and I home it before I run any G1 codes. The FluidNC UI shows the axes are at 0,0,0 after I run a G38.2 and zero the Z axis either manually or with the probe then enter G92 . I do exactly what is in the start code you linked to, only manually line by line, except when it gets to the G1 line it goes into runaway mode and does not stop at X10/Y10/Z10, or whatever distance/location is specified.

I must be doing something else wrong, but all I am doing now is powering it up, connecting on my iPhone, homing the axes, running G21. G90, G94 and then setting the Z height I need and then G92 Z0. Then I run a G1 command and it runs away.

I’m missing something here, I’ll have to ponder it a bit.

I must be missing something, too. I had been running it the same way yesterday learning how to control it, and most of this morning trying to get a test piece to cut correctly, and did, then all of a sudden I get this wacky behavior.

After taking a few hour break from the machine, and with no intentional changes in my gcode or my start-up and homing procedure, the machine began behaving and skewing in each axis as directed, so I manually entered the first 6 or 7 lines of the EstlCAM project gcode and the head moved to where it should. This morning, I tried the manual approach again and was able to repeat the correct actions, so I taped down some MDF and started up the project - it worked perfectly.

I have no idea what could have changed. 6+ hours yesterday trying everything and it was a mess. Tried again after dinner and things worked! I have no idea what I might have done differently.