Strange Start code

I am not sure why I have the strangest start sequence ever getting added to my gdoce. I have a “User start” and “User End”

I also have a tool change

But I havent added any header operation start operation end etc. But the Gcode comes out with probe, change tool, probe again, start.

there is two sections in the Gcode titled “User start” but only the first one is my start script. The second looks like it “starting” the next tool but it still is just strange!!

;MillMage Pro (Trial) 0.9.00-RC-1 @ e69d8cc Qt6.11.1
;Custom GCode device profile, absolute coords
;Bounds: X0 Y0 to X600 Y900
;Project Units: Metric
;Safe Retract = 3
;Stock Thickness: 20
;Z Zero: Top
;Workpiece origin is at the Bottom Left
G00 G17 G40
G21;Restore metric mode
G54

G90;Restore absolute mode

;USER START SCRIPT
G90
G94
G10 L20 P0 X0 Y0 Z0 (set current location to zero, survives reboot)
G0 X10 Y10 F2000 (move to probing location)
M0 (MSG Attach probe)
G38.2 Z-110 F200 P0.5 (probe down set thickness )
G1 Z10 F900
M0 (MSG Remove probe)

;USER START SCRIPT
;Bore @ 3810 mm/min, 22000 RPMs
M5
$HZ
G0 X10 Y10 F2000 (move to probing location, match first location)
M0 (MSG change tool, probe)
G38.2 Z-110 F200 P0.5 (Probe set thickness)
G00 Z10.0000 F500 (Clearance)
M0 (MSG remove probe)

Ive looked through everything else I can think of to test this and the only way to make it stop is the Tool change toggle
image

but that stops all tool change sections of code.

It’s workable, but a huge time suck.

this was the closest I could find to the same issue, but running @P threw alert 17 all over the place.

For the record, I am creating gdode from MM in my office, then saving to an SD card and walking it out to my machine which is running FluidNC 4.0.3 and WebUI 3

Can you share a bundle with your config and an example project?

I think what you are seeing may be a bug (small one, the second “User Start Script” should say “tool change”) but it would be easier to reproduce if I have your setup.

Is this actually an issue or are you just getting hung up on the 2 “User Start Script” entries?

I actually was able to reproduce this -

The Second “User Start Script” Tag is the tail end of the user start script itself. It just has some odd white space in it.

After that you get the following

;USER START SCRIPT - end of the start script
;Bore @ 3810 mm/min, 22000 RPMs - Tag line of the op 

Then

(begins to the tool change block because you have "Output tool Change" on

M5 -  Stop spindle

*Start tool Change Block* 
$HZ 
G0 X10 Y10 F2000 (move to probing location, match first location)
M0 (MSG change tool, probe)
G38.2 Z-110 F200 P0.5 (Probe set thickness)
G00 Z10.0000 F500 (Clearance)
M0 (MSG remove probe)

So while this looks wierd, it’s doing exactly what is commanded

they look like the v1 enginnering codes from the online docs ?

hey joe

i originally tried those codes way back in rc1, in same boxess, with some weird and wonder full things happening, over time with the development of MM and support help , i now have nothing in user script.

in tool change i have

G0 X50 Y10 F2000 (move to probing location, match first location)

@P (CHANGE TOOL) {tool_name}

and use the MM probe wizard settings for probe and using the z probe only

and have

@P (MSG remove probe) in operation start box, if that isnt incluuded router shoots of without time to remove probe

7-24-26 bundle.mmzip (9.4 KB)

I think what its doing is probing for the work surface, then asking for the toll to be loaded and probing for the tool’s length.

Thats silly for my machine since I have to have the first tool loaded to probe correctly. But I guess other machines might have a very different use-case with one of those little round ball feeler probes.

I’m assuming its right, but would turn this into less of an issue and more of a feature request with a toggle that is basically a “z probe” or " XYZ probe" because it can eliminate a bunch of extra moves.

for now, I’ll just take the probe sequence out of the user start and see what happens

@P doesnt work for me because I’m not connected to the machine. I just get Gcode errors. I can use that setup and just change it for M0 and see what happens. Thanks for the tip

Because it is a MillMage directive, not a GCode command. For move-pause-move to work, you need direct control of the machine.

are you transferring to sd card and running through fluid nc app ?

is your computer not at machine

Yes, remove the probe from your start sequence.

Or turn off the tool change output and run multiple jobs.

For @P to work, you would need to be running from MillMage. @P gets intercepted by MillMage and never actually sent to the machine.