Relay trigger on M81 G-Code instruction
Dear,
I am looking for the solution to stop the printer by deactivating the GPIO output (printer ON/OFF relay) on the M81 instruction of my end-of-print G-Code.
Is there a solution?
Thanks in advance for your help.
Regards
Laurent
Thanks in advance for your help.
Regards
Laurent
Comments
So solution depends on where the gpio pin is - on printer board, then you need to change firmware to implement it.
If it is a raspberry pi go to global settings->gpio and you can define a switch. It will also show a gcode command to trigger the switch and if you add it to menu it will appear as switch in the gui as well. See gpio description in manual on in docs on our homepage.
- Name : onoffRelay
- Function : Set output on/off
- GPIO Pin : 146
- G-Code to trigger: ;@gpio onoffRelay on|off|toggle
- Show in Menu : Selected
Thanks in advance for your help.
Regards
Laurent
The on/off relay works fine from the printer menu.
Regards
Laurent
Please check in console if manual sending
@gpio onoffRelay off
@gpio onoffRelay on
do what supposed. Since it works in menu I think so, so you just need to make sure the command gets executed at the right time.
If you have it in your end gcode (M81) you need to replace it there with
@gpio onoffRelay off
or add a replacement rule
^M81\b
to be replaced by
@gpio onoffRelay off
From what you write I guess you have the M81 in the gcode not the server command it self.