LaserWeb / lw.comm-server

Unified communications server for LaserWeb4 (and other frontends)
GNU General Public License v3.0
38 stars 47 forks source link

Job Abort on Marlin sends M112, this halts the controller and forces a manual reset by the user. #87

Closed descipher closed 3 years ago

descipher commented 3 years ago

It would be better to send nothing and allow a resume by the user. A job abort is restarted on the client end and if the user does resend it starts from the beginning of the job.

Recommend removing the following from server.js:

            machineSend('M112\n'); // abort
            writeLog('Sent: M112', 2);

and have the following action:

        case 'marlin':
            paused = true;
            break;
cprezzi commented 3 years ago

Job Abort is meant to be a emergency stop (immediate, in the middle of a move), in case of a serious problem. What you describe is the Job Pause function, which can be resumed afterwards.

descipher commented 3 years ago

I understand the functions, however if this were grbl you can simply send $X and it’s communication is restored. On marlin the CPU is halted, there is no communication and it’s dead, you need a power cycle or reset. I can see more graceful ways of handling the abort on Marlin. For example we can send a shut off the laser unlock the motors and still communicate with it from there. Also if a display is defined on Marlin controller, M0 and M108 are usable as well an emergency stop button in the UI is an option.