Welcome! Log In Create A New Profile

Advanced

How do I detect if move is finished?

Posted by LoboCNC 
How do I detect if move is finished?
March 10, 2017 04:53PM
I'm trying to coordinate 2 marlin-based controller boards for a robot project and I need to be able to poll each boards to see when it has finished its current move. I haven't found any commands that simply tell you if the steppers are still moving or not. Any suggestions? (I know Marlin is not designed for this sort of thing, but I'm trying to get something going quickly with the tools I have.)
VDX
Re: How do I detect if move is finished?
March 10, 2017 06:18PM
... there is the option to set a watch-dog timer - use it for a heart-beat on an I/O-pin to get a "waiting" signal ...


Viktor
--------
Aufruf zum Projekt "Müll-freie Meere" - [reprap.org] -- Deutsche Facebook-Gruppe - [www.facebook.com]

Call for the project "garbage-free seas" - [reprap.org]
Re: How do I detect if move is finished?
March 10, 2017 06:52PM
Quote
VDX
... there is the option to set a watch-dog timer - use it for a heart-beat on an I/O-pin to get a "waiting" signal ...

Thanks for the help. Is this the M43 command? How would I use it and then read the I/O pin state through the serial port?

EDIT: Actually, never mind. I bit the bullet and hacked in a new M-code that reports back if X, Y, Z or E is actively moving. I'm happy to share the code mod if anyone is interested.

Edited 1 time(s). Last edit at 03/10/2017 09:47PM by LoboCNC.
Re: How do I detect if move is finished?
March 11, 2017 02:11AM
A while back, I had the idea to have four SCARA Arms print on one bed. That would've needed some handshake signals to avoid collisions etc.
I have no time to realize this plan, but it's good to know that such code exists.

Does your M-code also tell about coordinates of the axis or is it just a busy signal?
It would be enough to know the final coords of the actual move or raise a pin that tells other controllers a move ends in the " collision zone " .
Re: How do I detect if move is finished?
March 11, 2017 11:12AM
Quote
o_lampe


Does your M-code also tell about coordinates of the axis or is it just a busy signal?
It would be enough to know the final coords of the actual move or raise a pin that tells other controllers a move ends in the " collision zone " .

My code just returns a busy signal (e.g.: X1Y1Z0E1) with a 1 or a 0 indicating if an axis has anymore steps in its queue. The M114 command returns position coordinates - but they aren't the motor's current position coordinates so they can't be used for coordination.
Sorry, only registered users may post in this forum.

Click here to login