Workpiece origin

Hi there,

I’ve been experimenting with the MillMage, and it’s really cool and fun to use. However, I have an issue with ensuring my CNC machine always returns to the workplace origin (bottom left) after completing a job. I’ve been using Fusion 360, which automatically returns to the origin once the job is done. However, I no longer want to rely on Fusion because it no longer meets my needs. MillMage is precisely what I’ve been looking for over the years. I need a few minor refinements, and I should be ready to go.

Could someone help me resolve this?

MillMage GCode:

G1 X153.047Y301.45
G0 Z30
M107
M5
G90;Restore absolute mode
M2

Fusion GCode:
G1 X35.915 Y200.951
G0 Z15
G0 Z30
G0 X0 Y0
%

Thank you for your time!

I’m only using MillMage to generate the GCode at this stage

I would create a Macros, once the task is finished you just press it and it goes to 0 of the machine (not the task).

1 Like

This would put my part under the gantry and behind the spindle.

Macro “Retract”:
$HZ
G0 X200 Y300

This moves Zaxis up and brings the table forward so I can get to the part.

1 Like

Ok then use it. I have my macros and the job done.

2 Likes

You can go into the Device Settings, custom gcode tab and find the Job End gcode:

By default it only sends M2. You can add the G0 X0 Y0 before or after the M2 as you prefer.

This will alleviate the need for a macro.

3 Likes

This is what you need


Surely I shouldn’t have to enter extra code for the MM to return to the project origins

Telling the machine to move to a finish position is pretty standard. How you do it is up to you.

should this be standard if you were designing a program the the starting position should be the finishing position?

One of the major contributing factors to LightBurn’s success so far is the decision to be Hardware-Agnostic. MillMage will allow a user to adhere to and conform to a variety of CNC controllers, firmware options and workflow preferences.

1 Like

What I meant by this is that the start position may not necessarily be the load position. I call the spot where the tool starts cutting as the “start position”. Others may call where it is resting when you push the button as the “start position”.

Mikey’s Version:

  1. Load position = Spindle is out of the way.
  2. Start position = Where the cutter first goes Z-minus.
  3. Finish position = Where it goes so you can remove the part.
  4. Safe position = Where you jump to when it snaps a tool.

As @JohnJohn said, MillMage is extremely wide based. Our real problem is just using the same terminology when we talk to each other. :joy:

2 Likes

I believe that applies to everything, but it’s especially crucial in technical areas. Making sure we all use the same names is hard. It’s something that we sometimes even struggle internally as well.

2 Likes

Sorry about that, guys. I meant no disrespect. I want the machine to move back to the bottom left, where it started. Would this be the finish position? Sorry, I’m so used to Fusion doing this for me. But I’m excited that Millmage is here and eager to learn more.

Thanks again for your help!

Here is the start of the code. I believe I mean workpiece origin

;MillMage Pro 0.8.00-RC-14 @ e747243 Qt6.5.7
;Custom GCode device profile, absolute coords
;Bounds: X28.987 Y18.724 to X305.275 Y301.62
;Project Units: Metric
;Safe Retract = 30
;Stock Thickness: 2.1
;Z Zero: Top
;Workpiece origin is at the Bottom Left
G00 G17 G40 G21;Restore metric mode
G54

G90;Restore absolute mode
G0 Z30
G90;Restore absolute mode
;Profile @ 1000.002 mm/min, 15000 RPMs

M5
T0
M3 S15000
G0 Z30
G0 X83.385Y60.75Z30
G0 Z2
G1 Z0F333.3
G1 Z-2.1
G1 X82.744Y58.348F1000

No apology needed, did not view in that light.

I just did a serious search for Finish Position like Lightburn has. Best I can tell, the finish position is where the cutter is last located when it finishes the cut. You can set Go-To positions in the Move window, but I could not find anything that was automatic. There may have been a good reason for leaving that out.

I get the impression you will be using the same finish position for all cuts. In that case, you can add commands to the Custom GCode tab, User End Script. Edit this for your own settings…
1, G0 Z0 M5
2. X250 Y250

The M5 may be optional; you might examine the GCode output to see if it is needed. Let us know if this helps.

Just noticed this. Is your material surface 30mm down from the Zhome position?

I have given you the solution and it is simple. Millmage puts it in every job you create.

the Z0 is of the machine not of your work. Z goes up first and then goes to XY

1 Like

Yes this is my Z position. I have alway use 30mm from the surface of the material. This was a recommendation from the guys that made the machine. so i have alway keeped with that height

So I have set up this. Does the ‘F’ stand for finish? and what does the 2400 mean?

;MillMage Pro 0.8.00-RC-14 @ e747243 Qt6.5.7
;Custom GCode device profile, absolute coords
;Bounds: X28.987 Y18.724 to X305.275 Y301.62
;Project Units: Metric
;Safe Retract = 30
;Stock Thickness: 2.1
;Z Zero: Top
;Workpiece origin is at the Bottom Left
G00 G17 G40 G21;Restore metric mode
G54

G90;Restore absolute mode
G0 Z30
G90;Restore absolute mode
;Profile @ 1000.002 mm/min, 15000 RPMs

M5
T0
M3 S15000
G0 Z30
G0 X83.385Y60.75Z30
G0 Z2
G1 Z0F333.3
G1 Z-2.1
G1 X82.744Y58.348F1000
G1 X82.062Y56.014

CODE…

G1 X153.047Y301.45
G0 Z30
M107
M5
G90;Restore absolute mode

;USER END SCRIPT
F2400
G53G0Z0
G5G0X0Y0

;USER END SCRIPT
M2 G0 X0 Y0