Closed mron closed 4 years ago
Did you run a search before posting?
Add immediate commands for: Status
That is covered by M114_REALTIME
.
Add immediate commands for: Pause Resume
There’s an open PR: https://github.com/MarlinFirmware/Marlin/pull/17462 and FR: https://github.com/MarlinFirmware/Marlin/issues/19253
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Description
I would like to see Marlin integrate with CNC controllers. Universal GCode Sender for example. To make this possible, these 3 commands would be a minimum.
Add immediate commands for: Status Pause Resume
when these commands are received they act immediately.
Feature Workflow
[First Action] Adding Status should easiest. Either make the current M114 immediate, or add a new command.
Pause I don't know the Marlin command queue and motion planner operate. Marlin should always know the current x,y,z position and spindle speed and the current motion command (G0,G1,G3..). I'm ignoring extruders, CNC mills don't have extruders. The motion planner must have some idea of where it's going. When a Pause is requested: Compute a the distance the head will travel given it's current velocities at maximum deceleration. Compute a point that distance along the projected path. Compute the steps for that path, Replace current motion with new path Create a new motion command to pick from the paused location to the original path, Save that command so it can be inserted into the command queue?
3.Resume Should Resume be the responsibility of Marlin or the CNC controller? Marlin will have unexecuted commands in the queue. The CNC controller may not know what commands have been executed. Marlin will create a new command to resume. It seems like Resume is Marlins responsibility. When the Resume command is given, Marlin adds the generated code to top of the queue and begins executing the queue.
I am willing to make a pull request and work on this. I would like to see Marlin used in this application. Marlin seems to be supported by more hardware and the new TMC5160 drivers have enough current to run small mills. Smoothieware and GRBL are very capable and widely used. They don't seem interested in supporting cheap boards and modular drivers.