<p>I don't see one at <a href="http://reprap.org/wiki/G-code" rel="nofollow noreferrer">http://reprap.org/wiki/G-code</a> so it's probably safest to set the power supply to the state you want.</p>

CC BY-SA 3.0
2017-05-09T14:12:43.393Z
2017-05-09T14:12:43.393Z
Davo
<p>Thanks! I confirmed that there isn't such a G-code.
I sent a pull request to make this posible:
<a href="https://github.com/MarlinFirmware/Marlin/pull/6671" rel="nofollow noreferrer">https://github.com/MarlinFirmware/Marlin/pull/6671</a></p>

<p>Now, "M80 S" reports the current state of the power supply.</p>

CC BY-SA 3.0
2017-05-10T23:40:37.333Z
2017-05-13T23:12:29.567Z
2017-05-13T23:12:29.567Z
Pablo
<p>I'm using <code>M80</code> and <code>M81</code> G-codes to power on/off power supply. </p>

<p>Is there a G-code to know the actual state of the power supply?</p>

CC BY-SA 3.0
2017-05-10T19:39:23.280Z
While there is no dedicated command for this, there may be some options.  Can you describe your hardware?
Are you using a stock printer or a custom?
What are you turning off with the M81?
Are you just turning off the 12V and leaving 5V board supply on?
What boardset are you running?  RAMPS?
markshancock
<marlin><reprap><g-code><switching-power-supply>
Is there a G-code to get power supply state?
Pablo
# Is there a G-code to get power supply state?

(Asked by: username_0 on 2017-05-09)

I'm using `M80` and `M81` G-codes to power on/off power supply.

Is there a G-code to know the actual state of the power supply?

**Tags:** marlin, reprap, g-code, switching-power-supply
> **Comments:**
> **username_1**: While there is no dedicated command for this, there may be some options.  Can you describe your hardware? Are you using a stock printer or a custom? What are you turning off with the M81? Are you just turning off the 12V and leaving 5V board supply on? What boardset are you running?  RAMPS?  

---

## 2 answers

### Answer by username_0 on 2017-05-10. Score: 2 | Accepted answer

Thanks! I confirmed that there isn't such a G-code.
I sent a pull request to make this posible:
<https://github.com/MarlinFirmware/Marlin/pull/6671>

Now, "M80 S" reports the current state of the power supply.


---

### Answer by username_2 on 2017-05-09. Score: 2

I don't see one at <http://reprap.org/wiki/G-code> so it's probably safest to set the power supply to the state you want.


---

