Wait command within python script

More
21 Apr 2015 21:17 #57972 by binbsoffn
Hi there,

i'm using linuxcnc for a 3D-printer.
It all works fine, but there are still some comfort issues:



current state
For printing i need to heat printbed and extruder, which takes at about 10mins.
At the moment i have to sit beside the printer and wait until both have reached target temperature.
And afterwards start the print manually.


target state
I want to automate the wait cycle via a python script, so the printer continues printing after the heating cycle
(other Firmwares use M190 or M109 for set temperature and wait)
Temperature is set and read via a serial interface.


The current script i want to use works fine, if i call it directly from a terminal, but does not work when i call it from within AXIS.
After a few seconds the print just stops completely.
I assume there is some timeout/safetycounter implemented to prevent broken scripts from blocking the whole machine?
How can i get the machine in a waiting state without any timeout?
is there any command in the linuxcnc python module where i can reset this timer?
Should i use M66 or G4 before this script to prevent AXIS from stopping the whole script?

I attached the script i currently work at.

Please Log in or Create an account to join the conversation.

More
21 Apr 2015 22:21 #57973 by ArcEye
Hi

Nothing attached, rename it .txt or put it in a zip to guarantee it gets attached

regards

Please Log in or Create an account to join the conversation.

More
21 Apr 2015 22:45 - 21 Apr 2015 22:53 #57974 by andypugh

For printing i need to heat printbed and extruder, which takes at about 10mins.
At the moment i have to sit beside the printer and wait until both have reached target temperature.
And afterwards start the print manually.


An alternative way to do this would be in HAL, with a "comp" component for the two temperatures connected to an "and2" which in turn drives the "spindle at speed" input pin or the feed-hold pin. (you would invert the logic and use "or2" in that case)

www.linuxcnc.org/docs/html/man/man9/motion.9.html#PINS
www.linuxcnc.org/docs/html/man/man9/comp.9.html
www.linuxcnc.org/docs/html/man/man9/and2.9.html

[edit] Or the and2 could connect to motion.digital-in-NN and then M66 wait could be used in the G-code (with a long timeout)
Last edit: 21 Apr 2015 22:53 by andypugh.

Please Log in or Create an account to join the conversation.

Time to create page: 0.061 seconds
Powered by Kunena Forum