Anomaly w/ my @execute commands
I have two commands in extcommands.xml (one to power on (printeron) and one to power off (idleoff) printer). Both show up and work in repetier host under printer dropdown. Somehow i lost my end code script for my printer so I need to redo it but the @execute idleoff or @execute printeron are not working. I am first trying to test in the g-code area of manual control in host. Am I doing something wrong here? it's been a while since I set this up but I know I can run the scrips as user repetierserver via cli on the Pi and they work fine. Obviously since they work in the dropdown under Printer I know they work for that user but wanted to double check.
Shouldn't I just be able to type @execute and the command name (defined in the extcommands.xml) in the manual g-code area? I am able to run other gcode here fine so I have communication.
Here is the contents of extcommands.xml just because I know someone will ask.
Thanks
Dave
Shouldn't I just be able to type @execute and the command name (defined in the extcommands.xml) in the manual g-code area? I am able to run other gcode here fine so I have communication.
Here is the contents of extcommands.xml just because I know someone will ask.
<command>
<name>Power on Printer</name>
<execute>gpio write 8 0</execute>
</command>
<command>
<name>Power off Printer</name>
<execute>gpio write 8 1</execute>
<confirm>Shut down printer?</confirm>
</command>
<execute name="printeron" allowParams="true">/db/printeron.sh</execute>
<execute name="idleoff" allowParams="true">/db/printeroff.sh</execute>
Thanks
Dave
Comments
As it looks you are just setting gpio pin. Meanwhile server has gpio support so if you go to global settings -> GPIO you can add an output pin as Menu entry which also has a command for gcode integration. Advantage is that the button becomes a switch showing state.
Otherwise use the working gpio command also in execute would be the easiest solution. O maybe you just have not set x flag for your scripts if they are visible for repetierserver.
Ok as a test I used the BCM pin # (2) rather than the GPIO pin (8) and that seemed to work using this new method in in global settings. With that said, is using an end code in printer settings on Host the best way to do this or is there a way in server? I do see some event dependent stuff in there but I'm not sure how this are applied. I tried to set the gcode to run my new working power on command (;@gpio Power on) and connected repetier host but the printer did not come on so i'm sure that isn't how that works. I also saw a :shutdown printer" command in there which I put in ;@gpio Power off but i'm unsure what must occur for these to even be triggered. I also put the corresponding commands in the power off/on button commands as replacements for the gcode but unsure if that is even something I should be going. Reading the manual but not finding out much info on these details.
Maybe I just need to put these commands in run before/after job?
Dave
Power on/off button is not best since it does not allow switching. Better is to set in gpio to make it appear in printer context menu. Then it is a on/off switch automatically also working when the printe ris completely disconnected due to power off (incase usb is not powering cpu).
Dave
Looking in server queue i see it says the correct ETE and computing, then to the right it says printing time 1 second and the job goes away. If i remove the Run before job line it prints fine and does run the run after job g-code to shut off the printer.
Perhaps run on connect to run my gcode ";@gpio Power on" would be a better place for it than run before job? I feel that to be counterintuitive though.
Dave
One problem might be that printer needs some time until power is available.
You should add a sleep after power on before going on.
Did you check console for messages that could cause a print abort? Maybe printer resets on power on? That would stop a print immediately.
FYI
I just went ahead and added the wait command and it worked the first three times after saving . I will print a few more and report back if i have any other issues. I wonder if that wait time gives the printer a second to initialize before receiving the gcode. You'd think it' get some error if gcode wasn't able to be received rather than just a "job finished"
Thank you again for your support. I have sent you a donation for your time.
Dave