<blockquote>
  <p>what I actually want to do is move Z up 10mm</p>
</blockquote>

<p>The command <code>G1 Z-10</code> tells the printer to <em>decrease</em> the Z-axis position, i.e., move the nozzle closer to the bed. You should use <code>G1 Z10</code> instead.</p>

CC BY-SA 3.0
2017-10-14T15:38:04.470Z
2017-10-14T15:38:04.470Z
Tom van der Zanden
<p>Thanks in part to Tom van Der Zanden, I got a working version, which I'll paste below to add some actual value to this question! The G1 XY coordinates for each position are for near the corners on a 220x220 bed, but leaving enough room to access a screw in the corner of the bed if you need to (I don't anymore, but my printer did initially) - for different bed sizes, you'll want to change them. Add to ~/.octoprint/config.yml</p>

<pre><code>controls:
- children:
  - commands:
    - M140 S50
    - M104 S190 T0
    name: Preheat
    type: command
  - commands:
    - G91
    - G1 Z10
    - G90
    - G1 X30 Y50 F9000
    - G28 Z0
    name: Front Left
    type: command
  - commands:
    - G91
    - G1 Z10
    - G90
    - G1 X180 Y70 F9000
    - G28 Z0
    name: Front Right
    type: command
  - commands:
    - G91
    - G1 Z10
    - G90
    - G1 X30 Y160 F9000
    - G28 Z0
    name: Back Left
    type: command
  - commands:
    - G91
    - G1 Z10
    - G90
    - G1 X180 Y160 F9000
    - G28 Z0
    name: Back Right
    type: command
  - commands:
    - G91
    - G1 Z10
    - G90
    - G1 X100 Y100 F9000
    - G28 Z0
    name: Centre
    type: command
  layout: horizontal
  name: Levelling
</code></pre>

<p><a href="https://i.sstatic.net/9JIfH.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/9JIfH.png" alt="enter image description here"></a></p>

CC BY-SA 3.0
2017-10-14T13:38:50.960Z
2017-10-14T13:38:50.960Z
AnotherHowie
<p>A while ago, I created some simple command buttons in Octoprint to help with bed levelling, by hopping to particular points on the bed. I realised that what I actually want to do is move Z up 10mm, move, and then home Z though, to avoid ploughing the nozzle along the bed if the level is badly off.</p>

<p>So I did this:</p>

<pre><code>  - commands:
    - G91
    - G1 Z-10
    - G90
    - G1 X30 Y160 F9000
    - G28 Z
    name: Back Left
    type: command
</code></pre>

<p>Which should be, switch to relative move, Move -10mm Z, switch back to absolute, go to the specified point and then home Z.</p>

<p>Except there's no Z move. I get the feeling that something might be optimising the moves together into one, or something similar... how can I get my printer to move up, <em>then</em> across, <em>then</em> down?</p>

<p>(printer is an quite modified Anet A8 i3 clone - I think the board is Melzi-based?)</p>

CC BY-SA 3.0
2017-10-14T11:15:41.223Z
Are you sure that *minus* 10 corresponds to moving the Z axis *up*? Shouldn't that bring the nozzle closer to the printbed instead?
Tom van der Zanden
CC BY-SA 3.0
2017-10-14T13:31:16.843Z
You know, I could have sworn I tested that separately! You are quite right...
AnotherHowie
<g-code><octoprint>
gcode commands in octoprint: Z moves ignored?
AnotherHowie
# gcode commands in octoprint: Z moves ignored?

(Asked by: username_0 on 2017-10-14)

A while ago, I created some simple command buttons in Octoprint to help with bed levelling, by hopping to particular points on the bed. I realised that what I actually want to do is move Z up 10mm, move, and then home Z though, to avoid ploughing the nozzle along the bed if the level is badly off.
So I did this:
  - commands:
    - G91
    - G1 Z-10
    - G90
    - G1 X30 Y160 F9000
    - G28 Z
    name: Back Left
    type: command

Which should be, switch to relative move, Move -10mm Z, switch back to absolute, go to the specified point and then home Z.
Except there's no Z move. I get the feeling that something might be optimising the moves together into one, or something similar... how can I get my printer to move up, then across, then down?
(printer is an quite modified Anet A8 i3 clone - I think the board is Melzi-based?)

**Tags:** g-code, octoprint
> **Comments:**
> **username_1**: Are you sure that *minus* 10 corresponds to moving the Z axis *up*? Shouldn't that bring the nozzle closer to the printbed instead?  
> **username_0**: You know, I could have sworn I tested that separately! You are quite right...  

---

## 2 answers

### Answer by username_1 on 2017-10-14. Score: 0 | Accepted answer

> what I actually want to do is move Z up 10mm

The command `G1 Z-10` tells the printer to *decrease* the Z-axis position, i.e., move the nozzle closer to the bed. You should use `G1 Z10` instead.


---

### Answer by username_0 on 2017-10-14. Score: 0

Thanks in part to Tom van Der Zanden, I got a working version, which I'll paste below to add some actual value to this question! The G1 XY coordinates for each position are for near the corners on a 220x220 bed, but leaving enough room to access a screw in the corner of the bed if you need to (I don't anymore, but my printer did initially) - for different bed sizes, you'll want to change them. Add to ~/.octoprint/config.yml
controls:
- children:
  - commands:
    - M140 S50
    - M104 S190 T0
    name: Preheat
    type: command
  - commands:
    - G91
    - G1 Z10
    - G90
    - G1 X30 Y50 F9000
    - G28 Z0
    name: Front Left
    type: command
  - commands:
    - G91
    - G1 Z10
    - G90
    - G1 X180 Y70 F9000
    - G28 Z0
    name: Front Right
    type: command
  - commands:
    - G91
    - G1 Z10
    - G90
    - G1 X30 Y160 F9000
    - G28 Z0
    name: Back Left
    type: command
  - commands:
    - G91
    - G1 Z10
    - G90
    - G1 X180 Y160 F9000
    - G28 Z0
    name: Back Right
    type: command
  - commands:
    - G91
    - G1 Z10
    - G90
    - G1 X100 Y100 F9000
    - G28 Z0
    name: Centre
    type: command
  layout: horizontal
  name: Levelling


---

