For example, what I'm trying to set up a job using nesting in cambam. My intent is that at the end (or beginning) of each iteration, it homes itself, returns to the correct workspace and location, then continues the next piece in the loop.
The way this makes sense to me is to create an MOP footer in cambam defined as "$H, G55, G0 x0y0, G0 z0". But the $H commands generate a 'error: busy or queued' statement. The problem doesn't seem to be using tokens inside gcode, since if I just embed a '$$' token, this returns a list of grbl settings, as you would expect. I imagine that what's happening here is that it just skips the homing routine if there are incomplete commands in the queue ahead of it. I thought I might be able to use "!" to do a feed hold, "$H" to home, and then "~" to continue the job. But homing routines don't seem to execute while it's in a feed hold state.
Is there a way I can make the machine pause before the "$h" token, make sure that all commands are cleared, and then continue? Or some other workaround?
okay, ten minutes after posting I figured out a hack that gets the desired results. Here's my MOP footers:
Code: Select all
G0 G0 G0 G0 G0 G0 G0 G0 G0 G0 $H G55 G0 x0y0 G0 z0
However, this is an ugly, ugly way of getting the desired results. Anybody have the proper way of doing it?