Grbl Welcome String with cncjs

Hi All,

I spent some time getting cncjs working with the longmill last night. Ran into an issue - posting here because I didn’t see any talk about this on the forums when I searched.

With my set-up (running the cncjs 1.9.20 and the October 2019 grbl firmware) I could connect and issue commands via the console, but jogging in cncjs did not work, the controls were greyed out.

This is because the cncjs code looks for a specific string Grbl xx.xx ['$' for help] that doesn’t match the custom startup message Grbl 1.1h: LongMill build ['$' for help] (Oct 21, 2019) used in the longmill code.

To fix this, I downloaded the October 2019 sienci grbl source and changed report_init_message in report.c to:

// Welcome message
void report_init_message()
{
  printPgmString(PSTR("\r\nGrbl " GRBL_VERSION " ['$' for help] (Longmill Build 
Oct 21, 2019)\r\n"));
}

After I re-built and uploaded the code, cncjs was able recognize recognize when grbl was running. This fixed the jogging issue.

2 Likes

Bdfife: I looked on the web for cncjs and started to read up on it, but, being lazy, I would like to ask you a few questions:

  1. I assume that cncjs takes the place of ugs, yes?
  2. Does cncjs run on java, like ugs?
  3. I didn’t see a probe module on the web page. Is there one?

thank you

Interesting discovery @bdfife, I didn’t notice this was an issue in my testing but I might’ve missed it. Thanks for reporting back, I’ll take another look at it from my end :+1:

  1. Yes, I use this in place of ugs. I am running the software on a raspberry pi and it fills the same role for me as Octoprint does with my 3D printers.

  2. Not java, cncjs runs on node and instead of having a native UI, serves a webpage that you open up in a browser.

  3. There is a probe ‘widget’ that ships with cncjs. I do not know if is compatible with the touch probe that ships with the longmill. I haven’t dug into this yet, but will soon.

A quick update, I have changed the welcome message on the firmware to report the version date and be compatible with CNCjs. It seems like if the initialization message is the same as default for the first part of it, it works.

https://sienci.com/dmx-longmill/grbl-firmware/

Andy: Does this mean that we should follow the instructions on your link and update the firmware on our controllers?

edit: Sorry, Andy. I did not read the previous posts. Silly, since I posted one of them. It would seem like those of us who are still running UGS have no need to update the firmware.