Handling External Commands in GCode

Hi everyone,
i'm realy new in 3D-Printing (only 4 Month) and i'm from Germany, so i first apologize my english writing.
I have managed to use external commands in Repetier-Server in Menu and in Gcode to turn on and off my Z-Wave plug to power on/off the printer. Everything just works fine but there is one big problem:
I Append the Command "@execute poweron" to my Gcode to power on my printer when i want to print this file. But: Repetier is setting the file on the waitinglist and do nothing, couse it will not read the first line of Gcode. How can i force Repetier to do so?

Thank you.
Bye Chris

Comments

  • Is your printer online before sending the gcode? I guess not from the description. So if you need to power it on so it connects to server it is not possible in gcode. Server will only start a job if the printer is online and otherwise queue it. So in that case you need to make it a menu command that you select before starting the print.
  • :( so there is no other way? May this is a wish for a future release ;)
  • No, it is just not possible to send when printer is not online. Normally you can modify boards that they are also powered by usb then it would work. On th eother side this puts load to pi and that is not always good.
  • If you dont Use the gcode for power up the printer it could be a solution to provide a Button for things to do befor reading the gcode. So you could tell the Server to do something (like sending a Command to Smart-Home-Server-Api) and than read the file. Or a Option to do something when printer is not online. ;)

  • That was my propsed solution! extcommands.xml can define menu entries with commands to execute just like with execute as well. You can even assign them to a printer so they appear in printer context menu and not the global menu.
  • Hi @Repetier,
    I have added entries to extcommands.xml however they all appear in the global menu.  How do I make them appear in the printer context menu?  I could not figure this out from the docs.
    Thanks.
  • This was the hint on how to do:

    Commands are normally visible in the global menu. If you want one to appear only in
    	     in the printer menu, add the attribute "slug" with the slugname as value to command tag
           where it should show up. You see the slugname when you select a printer as part of the path.

    Means
    <command slug="your slug name of the printer">
Sign In or Register to comment.