<blockquote>
<p>Every time I.m will go to print, if turn off the machine, the process to be need repeat, in other words, the gcode M500 doesn't work.</p>
</blockquote>
<p>This tells me that your firmware has the EEPROM support needed for the <code>M500</code> command disabled.</p>
<h1>Fixing the firmware</h1>
<p>You need to <a href="https://3dprinting.stackexchange.com/questions/12153/updating-marlin-firmware-step-by-step-guide">update your firmware</a> to enable storing the information in the EEPROM: the line should read as follows without any leading <code>//</code></p>
<pre><code>#define EEPROM_SETTINGS // Enable for M500 and M501 commands
</code></pre>
<p>When you are already updating your firmware, you should also fix your firmware to have the correct steps/mm, as those are off in your build. An example for the line you look for is</p>
<pre><code>#define DEFAULT_AXIS_STEPS_PER_UNIT   { 106.64, 106.64, 4000, 500 }
</code></pre>
<h1>Workaround</h1>
<h2>automatic setting of the Steps/mm fix</h2>
<p>There's a way to fix it on the user side though: When slicing, your Start-G-code needs to include <code>M92 X106.64 Y106.64</code>, best before homing. That way you make sure that your printer sets the correct Steps/mm whenever you load a printjob.</p>
<h2>Home position</h2>
<h3>via offset</h3>
<p>If the home offset is wrong, you can fix it as the next line <strong>before</strong> <code>G28</code> - if the home position is for example 10 mm of the trigger in both X and Y, you'd add <code>M206 X100.00 Y100.00 Z0.00</code> - If your printer has &quot;home&quot; properly defined in the center of the build plate and your slicer is set up to respect that, this should do it. You need to</p>
<h3>via move and 0-ing</h3>
<p>Another way to get the printhead to the center is to use <strong>first</strong> <code>G28</code>, then insert a movement to the center of the bed (<code>G0 X100 Y100</code> for a bed 200 mm across) and then order <code>G92 X0 Y0</code>, defining that point as the origin.</p>
<h3>necessary next line!</h3>
<p>In either case, the setup of Marlin also prevents you to move to the &quot;negative&quot; area due to the software endstops by default. So you need to add <code>M121</code> after it to be allowed to go into the negative space.</p>
<h2>Start G-code in bulk</h2>
<pre><code>M92 X106.64 Y106.64
G28
G0 X100 Y100 ; move to center
G92 X0 Y0
M121
</code></pre>

CC BY-SA 4.0
2020-07-13T19:14:05.937Z
Ok, I'll try, some like that [gcode script](https://pastebin.com/z3pdB4Xt)
Pedro Miguel Pimienta Morales
CC BY-SA 4.0
2020-07-13T19:44:43.800Z
Man thanks for all, your answer solved the measures and dimensions, now printed test cube right, but now still _homing_ in the position where the green circle like image post in the question. Do you know how solved that?
Pedro Miguel Pimienta Morales
CC BY-SA 4.0
2020-07-13T20:27:57.563Z
@PedroMiguelPimientaMorales Managed to trick around the whole software endstop problem by just turning them off after homing, positioning in center, and 0-ing.
Trish
CC BY-SA 4.0
2020-07-14T18:33:33.867Z
ok, let me understand, after execute `M92 ...`, need to center the nozzle using gcode too?
Pedro Miguel Pimienta Morales
CC BY-SA 4.0
2020-07-14T18:41:42.977Z
@PedroMiguelPimientaMorales other way round: First get the nozzle to the center, then send `M92 X0 Y0` which tells the printer "this is (0,0)" - M121 is needed afterwards to allow moving into the negative room
Trish
CC BY-SA 4.0
2020-07-14T19:30:49.827Z
Ok, i check your edit answer, and do this, [new script](https://pastebin.com/0nZ9WfDZ)
Pedro Miguel Pimienta Morales
CC BY-SA 4.0
2020-07-14T19:35:44.327Z
that should work
Trish
CC BY-SA 4.0
2020-07-27T02:15:42.040Z
Don't work the last script
Pedro Miguel Pimienta Morales
CC BY-SA 4.0
2020-07-13T17:56:00.347Z
2020-07-13T20:26:20.693Z
2020-07-13T20:26:20.693Z
Trish
<p>I have a <strong>Core XY Custom DIY Printer</strong>, but actually I have a problem with the measure in Axis X and Y. When a print a test cube with the measure 20 mm x 20 mm 20 mm, the object printed result with these dimensions.</p>
<p>Z = 20 mm
X = 15 mm
Y = 15 mm</p>
<p>Well, I know how solved this problem, because of long time ago have the same problem, do a question, and that was answered, and this moment solved my problem. <a href="https://3dprinting.stackexchange.com/a/10319/12715">answer old question</a></p>
<p>Now I use the same process</p>
<ol>
<li><p>Connect the printer to my pc</p>
</li>
<li><p>Use <strong>Simplify 3D</strong> for send gcode to the machine</p>
</li>
<li><p><code>M503</code> for get the set values</p>
</li>
<li><p><code>M92</code> for change the values X and Y</p>
</li>
<li><p><code>M500</code> for store the new values for default in the memory of the printer</p>
</li>
<li><p><code>M503</code> for check the actual values, and these are the correct</p>
</li>
</ol>
<p>So, I print the test cube, the measure are right, but with two problems</p>
<ol>
<li>Every time I.m will go to print, if turn off the machine, the process to be need repeat, in other words, the gcode <code>M500</code> doesn't work.</li>
<li>the nozzle doesn't start the extrusion in the middle when the parameters were changed.</li>
</ol>
<p>Send <code>M503</code> for known the parameters. These parameters are the set by default At this moment in the printer.</p>
<pre><code>G21    ; (mm)
M149 C ; Units in Celsius
Filament settings: Disabled
M200 D1.75
M200 D0
Steps per unit:
M92 X80.00 Y80.00 Z400.00 E100.00
Maximum feedrates (units/s):
M203 X100.00 Y100.00 Z2.00 E10.00
Maximum Acceleration (units/s2):
M201 X2000 Y2000 Z50 E5000
Acceleration (units/s2): P&lt;print_accel&gt; R&lt;retract_accel&gt; T&lt;travel_accel&gt;
M204 P2000.00 R2000.00 T2000.00
Advanced: Q&lt;min_segment_time_us&gt; S&lt;min_feedrate&gt; T&lt;min_travel_feedrate&gt; X&lt;max_x_jerk&gt; Y&lt;max_y_jerk&gt; Z&lt;max_z_jerk&gt; E&lt;max_e_jerk&gt;
M205 Q20000 S0.00 T0.00 X5.00 Y5.00 Z0.40 E5.00
Home offset:
M206 X0.00 Y0.00 Z0.00
Material heatup parameters:
M145 S0 H180 B70 F0
M145 S1 H240 B110 F0
PID settings:
M301 P13.70 I0.71 D65.64
</code></pre>
<p>After sending code <code>M92 X106.64 Y106.64</code></p>
<pre><code>G21    ; (mm)
M149 C ; Units in Celsius
Filament settings: Disabled
M200 D1.75
M200 D0
Steps per unit:
M92 X106.64 Y106.64 Z400.00 E100.00
Maximum feedrates (units/s):
M203 X100.00 Y100.00 Z2.00 E10.00
Maximum Acceleration (units/s2):
M201 X2000 Y2000 Z50 E5000
Acceleration (units/s2): P&lt;print_accel&gt; R&lt;retract_accel&gt; T&lt;travel_accel&gt;
M204 P2000.00 R2000.00 T2000.00
Advanced: Q&lt;min_segment_time_us&gt; S&lt;min_feedrate&gt; T&lt;min_travel_feedrate&gt; X&lt;max_x_jerk&gt; Y&lt;max_y_jerk&gt; Z&lt;max_z_jerk&gt; E&lt;max_e_jerk&gt;
M205 Q20000 S0.00 T0.00 X5.00 Y5.00 Z0.40 E5.00
Home offset:
M206 X0.00 Y0.00 Z0.00
Material heatup parameters:
M145 S0 H180 B70 F0
M145 S1 H240 B110 F0
PID settings:
M301 P13.70 I0.71 D65.64
</code></pre>
<p><a href="https://i.sstatic.net/dPw3h.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/dPw3h.jpg" alt="surface" /></a></p>
<ul>
<li>Red circle, the middle of the plate or surface printer, in this position, start to print with actual parameters by default, and respect the limits(black square), but, with the measure in axis X and Y wrong after printed the model.</li>
<li>Green circle, the nozzle start in this position when changing the parameter in axis X  and Y, printed with the measure correct, but by taking a position that is not the right one, it assumes other limits and spends almost half of the print surface area.</li>
</ul>

<diy-3d-printer><g-code><surface><corexy>
How to start a print in the center position after a change in parameters using M92 and M500 G-code
Pedro Miguel Pimienta Morales
# How to start a print in the center position after a change in parameters using M92 and M500 G-code

(Asked by: username_0 on 2020-07-13)

I have a **Core XY Custom DIY Printer**, but actually I have a problem with the measure in Axis X and Y. When a print a test cube with the measure 20 mm x 20 mm 20 mm, the object printed result with these dimensions.

Z = 20 mm
X = 15 mm
Y = 15 mm

Well, I know how solved this problem, because of long time ago have the same problem, do a question, and that was answered, and this moment solved my problem. [answer old question](https://3dprinting.stackexchange.com/a/10319/12715)

Now I use the same process

1. Connect the printer to my pc
2. Use **Simplify 3D** for send gcode to the machine
3. `M503` for get the set values
4. `M92` for change the values X and Y
5. `M500` for store the new values for default in the memory of the printer
6. `M503` for check the actual values, and these are the correct

So, I print the test cube, the measure are right, but with two problems

1. Every time I.m will go to print, if turn off the machine, the process to be need repeat, in other words, the gcode `M500` doesn't work.
2. the nozzle doesn't start the extrusion in the middle when the parameters were changed.

Send `M503` for known the parameters. These parameters are the set by default At this moment in the printer.

```
G21    ; (mm)
M149 C ; Units in Celsius
Filament settings: Disabled
M200 D1.75
M200 D0
Steps per unit:
M92 X80.00 Y80.00 Z400.00 E100.00
Maximum feedrates (units/s):
M203 X100.00 Y100.00 Z2.00 E10.00
Maximum Acceleration (units/s2):
M201 X2000 Y2000 Z50 E5000
Acceleration (units/s2): P<print_accel> R<retract_accel> T<travel_accel>
M204 P2000.00 R2000.00 T2000.00
Advanced: Q<min_segment_time_us> S<min_feedrate> T<min_travel_feedrate> X<max_x_jerk> Y<max_y_jerk> Z<max_z_jerk> E<max_e_jerk>
M205 Q20000 S0.00 T0.00 X5.00 Y5.00 Z0.40 E5.00
Home offset:
M206 X0.00 Y0.00 Z0.00
Material heatup parameters:
M145 S0 H180 B70 F0
M145 S1 H240 B110 F0
PID settings:
M301 P13.70 I0.71 D65.64

```

After sending code `M92 X106.64 Y106.64`

```
G21    ; (mm)
M149 C ; Units in Celsius
Filament settings: Disabled
M200 D1.75
M200 D0
Steps per unit:
M92 X106.64 Y106.64 Z400.00 E100.00
Maximum feedrates (units/s):
M203 X100.00 Y100.00 Z2.00 E10.00
Maximum Acceleration (units/s2):
M201 X2000 Y2000 Z50 E5000
Acceleration (units/s2): P<print_accel> R<retract_accel> T<travel_accel>
M204 P2000.00 R2000.00 T2000.00
Advanced: Q<min_segment_time_us> S<min_feedrate> T<min_travel_feedrate> X<max_x_jerk> Y<max_y_jerk> Z<max_z_jerk> E<max_e_jerk>
M205 Q20000 S0.00 T0.00 X5.00 Y5.00 Z0.40 E5.00
Home offset:
M206 X0.00 Y0.00 Z0.00
Material heatup parameters:
M145 S0 H180 B70 F0
M145 S1 H240 B110 F0
PID settings:
M301 P13.70 I0.71 D65.64

```

[![surface](https://i.sstatic.net/dPw3h.jpg)](https://i.sstatic.net/dPw3h.jpg)

* Red circle, the middle of the plate or surface printer, in this position, start to print with actual parameters by default, and respect the limits(black square), but, with the measure in axis X and Y wrong after printed the model.
* Green circle, the nozzle start in this position when changing the parameter in axis X and Y, printed with the measure correct, but by taking a position that is not the right one, it assumes other limits and spends almost half of the print surface area.

**Tags:** diy-3d-printer, g-code, surface, corexy


---

## 1 answers

### Answer by username_1 on 2020-07-13. Score: 1 | Accepted answer

> Every time I.m will go to print, if turn off the machine, the process to be need repeat, in other words, the gcode M500 doesn't work.

This tells me that your firmware has the EEPROM support needed for the `M500` command disabled.

# Fixing the firmware

You need to [update your firmware](https://3dprinting.stackexchange.com/questions/12153/updating-marlin-firmware-step-by-step-guide) to enable storing the information in the EEPROM: the line should read as follows without any leading `//`

```
#define EEPROM_SETTINGS // Enable for M500 and M501 commands

```

When you are already updating your firmware, you should also fix your firmware to have the correct steps/mm, as those are off in your build. An example for the line you look for is

```
#define DEFAULT_AXIS_STEPS_PER_UNIT   { 106.64, 106.64, 4000, 500 }

```

# Workaround

## automatic setting of the Steps/mm fix

There's a way to fix it on the user side though: When slicing, your Start-G-code needs to include `M92 X106.64 Y106.64`, best before homing. That way you make sure that your printer sets the correct Steps/mm whenever you load a printjob.

## Home position

### via offset

If the home offset is wrong, you can fix it as the next line **before** `G28` - if the home position is for example 10 mm of the trigger in both X and Y, you'd add `M206 X100.00 Y100.00 Z0.00` - If your printer has "home" properly defined in the center of the build plate and your slicer is set up to respect that, this should do it. You need to

### via move and 0-ing

Another way to get the printhead to the center is to use **first** `G28`, then insert a movement to the center of the bed (`G0 X100 Y100` for a bed 200 mm across) and then order `G92 X0 Y0`, defining that point as the origin.

### necessary next line!

In either case, the setup of Marlin also prevents you to move to the "negative" area due to the software endstops by default. So you need to add `M121` after it to be allowed to go into the negative space.

## Start G-code in bulk

```
M92 X106.64 Y106.64
G28
G0 X100 Y100 ; move to center
G92 X0 Y0
M121

```

> **Comments:**
> **username_0**: Ok, I'll try, some like that [gcode script](https://pastebin.com/z3pdB4Xt)  
> **username_0**: Man thanks for all, your answer solved the measures and dimensions, now printed test cube right, but now still _homing_ in the position where the green circle like image post in the question. Do you know how solved that?  
> **username_1**: @username_0 Managed to trick around the whole software endstop problem by just turning them off after homing, positioning in center, and 0-ing.  
> **username_0**: ok, let me understand, after execute `M92 ...`, need to center the nozzle using gcode too?  
> **username_1**: @username_0 other way round: First get the nozzle to the center, then send `M92 X0 Y0` which tells the printer "this is (0,0)" - M121 is needed afterwards to allow moving into the negative room  
> **username_0**: Ok, i check your edit answer, and do this, [new script](https://pastebin.com/0nZ9WfDZ)  
> **username_1**: that should work  
> **username_0**: Don't work the last script  

---

