Hi all, I’m writing a little UI to use with the TinyG, and in that I’m trying to replicate a bit of functionality from the Roland MDX-40 I also use.
I have my app able to download and run jobs, I’m using queue depth to manage flow control and can use ! and ~ to pause and resume the machine quite nicely.
What I really want to do is after pausing the machine, be able to issue some commands to turn off the spindle and park the head (i.e. go to max z, and then move the gantry away from the work. I then want to be able to resume by restarting the spindle (at the same speed) and then return to the point the job was paused and continue motion.
The problems I’m having at the moment is what to do about the items already downloaded into the planner queue? To make the move I want, I’m going to have to flush the queue, I can get the current xyz co-ords from the status message which switched to ‘Machine holding’ but I can’t see a way to back out the items in the planner queue.
I know there is a whole other bunch of state that will need to be dumped (co-ord system etc) so I can restore the correct world state before continuing, but the lost g-code steps seems to be the biggest issue at the moment.
So I have a few questions:
* Is there a way to have a id tagged into each {gc:””} message I send that gets returned to me when that move is complete. That way i can maintain my own checkpoint queue and resend the aborted lines of G-Code as needed.
* Is there a way to get the TinyG to dump the planner buffer so it can be reloaded?
* Is there a better way?
Cheers,
Stephen.