Lowrider tries to launch into orbit when attempting first cut

I have finished assembling my lowrider v3 but I am running into some issues trying to make my first cut. Of note, I cut out the strut plates by hand so this is the first time I am actually attempting to cut something with the router.

Before cutting anything I ran the crown test gcode and got what seems to be a pretty decent looking crown. Next I made a very simple model in fusion 360 to attempt my first cut with. The simulated toolpaths seemed to make sense, and I used flyfisher604’s post processor when generating the gcode.

When I go to run the gcode, the first thing I see on the screen is a dialog that pops up saying M0 Stop with the option to press the Continue button. When I press continue, the z axis starts moving upward and will keep moving up, smashing into the endstops and such until I hit the reset button. Its like it is trying to escape or something…

I took a look at the generated gcode but I am no expert as to what to look for. Trying to decipher some of the commands it all seems to make sense to a degree, however I noticed the first M0 stop command in the gcode includes a message Attach ZProbe but I do not see this message on screen.

My first guess is that this M0 Stop I am seeing is actually the one letting you know to attach the ZProbe but for some reason I just don’t see the Zprobe message. To test this, I tried touching the two Zprobe ends together to see if the upward movement would stop, but it did not. I have otherwise confirmed with M119 that the Zprobe reads open when the two ends are separate, and triggered when they are touching.

Also I would expect this command to start moving the Z Axis downard instead of up. When using the move command, or homing the z axis it moves in the expected direction.

I have observed one other odd behavior that might be related. Sometimes when I initially turn on the machine if I move the z axis it will just keep moving until I press reset no matter which distance I have selected on the movement screen. Sometimes it even moves the wrong direction. But after I home the machine, it seems to work as expected and I cant always replicate this even when turning the machine on the first time.

I have attached the full gcode file here, but also included what I think is the relevant snippet below.
helloworld.gcode (56.1 KB)

;Fusion 360 CAM 2.0.16985
; Posts processor: MPCNC.cps
; Gcode generated: Tuesday, October 3, 2023 7:28:29 PM GMT
; Document: thingy v1
; Setup: Setup2
;When using Fusion 360 for Personal Use, the feedrate of
...
; 
; Ranges Table:
;   X: Min=8.938 Max=69.262 Size=60.325
;   Y: Min=8.937 Max=69.262 Size=60.325
;   Z: Min=-4.81 Max=15 Size=19.81
; 
; Tools Table:
;  T1 D=3.175 CR=0 - ZMIN=-4.81 - flat end mill 
; 
; Feedrate and Scaling Properties:
;   Feed: Travel speed X/Y = 2500
;   Feed: Travel Speed Z = 300
;   Feed: Enforce Feedrate = true
;   Feed: Scale Feedrate = false
;   Feed: Max XY Cut Speed = 900
;   Feed: Max Z Cut Speed = 180
;   Feed: Max Toolpath Speed = 1000
; 
; G1->G0 Mapping Properties:
;   Map: First G1 -> G0 Rapid = false
;   Map: G1s -> G0 Rapids = false
;   Map: SafeZ Mode = Retract : default = 15
;   Map: Allow Rapid Z = false
; 
; *** START begin ***
;   Set Absolute Positioning
;   Units = mm
;   Disable stepper timeout
;   Set current position to 0,0,0
G90
G21
M84 S0
G92 X0 Y0 Z0
; COMMAND_TOOL_MEASURE
; Probe to Zero Z
;   Ask User to Attach the Z Probe
;   Do Probing
;   Set Z to probe thickness: Z0.8
;   Retract the tool to 40
;   Ask User to Remove the Z Probe
M0 Attach ZProbe
G28 Z
G92 Z0.8
G0 Z40 F300
M400
M0 Detach ZProbe
...

Change this to G38.2 Z0

G28 Z homes up to the limit switches, G38.2 is for the probe

Should look like this…

M0 Attach ZProbe
G38.2 Z0
G92 Z0.8
G0 Z40 F300
M400
M0 Detach ZProbe

Also be careful with the Z40. Most use 5-10mm

Hopefully you have verified movement to be correct. Z+ goes up, Y+ moves the beam away from thebrouter side, and X+ moves the router toward the rail side.

G28 Z (as stated) should move the Z axis upwards until the Z limit switches are triggered. If it is not stopping there, use M119 to check end stop states and be sure that the switches read as triggered when pressed.

G38.2 Z0 should move the router downwards until the touch plate is triggered.

Personally I do not include this code in any of my cut files. I use macro files to position the X=0, Y=0 and Z=0 position before starting the cut file. This means that I have to remember to do it, but this has not caused me problems. I personally find this approach more flexible. If somethjng goes wrong with the touchplate trigger, I can just do it again without having to reset everything and start over.

1 Like

Are you sure you have the steps per mm correct for the Z-axis?

Oh gotcha, I see now in the post processor where there is an option to use either G28 or G38.2. The latter makes it behave like I was expecting it to.

Personally I do not include this code in any of my cut files. I use macro files to position the X=0, Y=0 and Z=0 position before starting the cut file. This means that I have to remember to do it, but this has not caused me problems. I personally find this approach more flexible. If somethjng goes wrong with the touchplate trigger, I can just do it again without having to reset everything and start over.

This seems like a reasonable approach especially for me figuring this all this out for the first time. This way I can run one piece at a time and debug them individually. After implementing the probing gcode separately and then running the cut file after the probe file things seem to behave much more as I expected.

Thanks so much for the help here all.

2 Likes