CNCjs & M0 Wait for User

New Home Forum Software / Firmware Development CNCjs & M0 Wait for User

This topic contains 8 replies, has 6 voices, and was last updated by  Jeffeb3 1 month ago.

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #117979

    Tealfixie
    Participant

    Just wanted to tap the community to see if anyone has experienced this issue and maybe found a solution. I’m keen on using CNCjs in my workflow since it is similar to my octoprint workflow.

    I use a Touch plate to zero my Z and the Gcode script contains M0 commands to pause and wait for attach z probe, etc. When I run the Gcode through Repetier host, all I need to do is click on the LCD and the process moves forward. However through CNCjs, I have to both click the lcd and click resume in CNCjs through the web UI. I also cannot just run headless because of this issue. Anyone have any ideas? I can’t seem to find anything in the CNCjs forums.

    #117982

    Jeffeb3
    Participant

    I haven’t tried it. What happens if you disable the lcd in the marlin firmware?

    #117983

    Tealfixie
    Participant

    I never thought to try that. Actually I wanted to run headless all along, but CNCjs was waiting for input from the LCD to move forward. I had to end up going out and buying an LCD. I guess it might have been easier to disable it in the firmware.  I guess I’ll have to experiment to find out. Anyway, I do like having the LCD since it’s easier to just click the wheel rather than do something at the computer.

    #118035

    Alec
    Participant

    I’ve actually had the same issue (I run completely headless via v1pi and don’t have an lcd). When an M0 gets issued (for a tool change I believe, it’s been a while), it’ll pause and there’s no way to get it to actually resume. I’ll end up having to stop the gcode file and take the M0 out and start over. Not a huge deal, as I just end up creating separate gcode files for each tool rather than doing tool changes, but it’s interesting to hear that someone’s had a similar issue. I haven’t seen anything in the cnc.js github issues referring to this, but I also haven’t looked in a while.

    I also hadn’t tried disabling lcd in the firmware, but please keep us posted if you try and it works!

    #118054

    frosty
    Participant

    If the controller is just waiting for a button press, can you just add a momentary switch to the appropriate pins of the LCD header to use as a “continue” button?

    #118056

    Ah hah! Now I understand what is going on using CNCjs and not being able to fully pause or stop and then resume with tool changes. I just haven’t done the troubleshooting on this since I have not had any jobs that really required it, but when I do a test piece, I get stuck and can’t for the life of me get going again until I reset everything. I hadn’t thought of the LCD un-pause.

    I just haven’t had the time recently to develop a proven workflow and debug all these issues since I was still building out the system. The last thing I have to do is wire the smart power controller to the board so I can turn the spindle and dust on and off with the code.

    Thanks for posting this question.

    #118072

    Bill
    Participant

    Is the pause from an M25 in the file? Couldn’t you just send an M24 to allow the resume?

    #118076

    Jeffeb3
    Participant

    Those are just for SD card pausing, right?

    I should have just looked at the documentation:

    http://marlinfw.org/docs/gcode/M000-M001.html

    It looks like you should at least enable the emergency parser, and you might also need to disable the LCD for the M0 to pause and the M108 from CNC.js to continue.

    #118077

    Jeffeb3
    Participant

    On the other hand, what CNC.js might be doing is intercepting the M0 and pausing on it’s own. If that’s the case, then you can just disable the LCD and CNC.js will just send more gcode after it’s no longer paused.

Viewing 9 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic.