Just thought i’d drop a note here for others that are looking to use pendants with CNCjs. Here’s how I set up both tinyweb and shopfloor on my v1pi - instructions should work for stock CNCjs as well.
First log into your Pi and clone the repository locally:
If you want, you could change to a tagged release branch. However, if you are running Marlin firmware (as I am), it hasn’t made it to any tagged releases as of the time of this post.
NOTE Running on a Pi3, I have seen some oddness - if CNCjs isn’t running after the restart try stopping and starting again (reboot works also). For some reason sometimes the restart doesn’t re-bind the ports.
sudo service stop cncjs
sudo service start cncjs
That should be it. Both should be available now (my v1pi has been renamed to mpcnc):
Thank you! This is great info. Great enough I am thinking of adding it to the v1pi docs.
Here are a couple notes:
You should clone those repos on the pi, not your laptop/computer. You can see later, they are put in the /home/pi/ directory.
You can start, stop, restart the service from the landing page. Those buttons map straight to sudo service calls.
Your address is mpcnc.local but that must be because you’ve changed your hostname. The default is v1pi.local.
Still. This is a really great addition. I had some trouble getting the .cncrc file to be used after the image booted the first time. I would love to actually put one or both of these into the image already. I know you can specify mount points in the cli arguments, but I would much rather have a decent default .cncjs file in the image already.
I’ve been running both of these pendants as well, but I just edited the start script in /etc/ to include the command line options.
Using the .cncrc file is a better approach.
Thanks for sharing…I should have too, but it didn’t occur to me…and I haven’t been cnc’ing lately due to other priorities, so haven’t really tested it much.
I decided to check them out after scrounging an old kindle fire tablet from someone.
The standard CNCjs interface was a bit too cluttered for the tablet. I foresee using the shop floor tablet interface on the fire as the primary interface to my lowrider.
I already had a “watch” directory set up, as a NFS mounted directory from my home file server (also a pi). This makes it easy to do the CAD/CAM on one computer and just save the gcode file to the CNC watch directory, ready for use.
I think that would be a nice feature.
There are some other cool options…like the PS3, and GPIO pendant interfaces, but those are hardware dependent.
The Shop Floor Tablet, and Tiny Web interfaces are just alternate web pages, and therefore pretty hardware generic.
They don’t take up much room, I can see a use for both depending on what you’re using to control it with. The pendant is exactly what I was envisioning when I did the A.R.M. terminal enclosure. Still need to get that out to the shop and wired up. Maybe this morning, but my brother and niece are coming down to visit for the weekend.
This is what I was thinking (take 2 they’re small…8^)
I’m running both simultaneously. It’s possible to have a all 3 interfaces open and in use simultaneously (i.e. standard CNCjs, Shopfloor Tablet, and TinyWeb).
I haven’t really worked with them yet, but I think I like the TinyWeb interface the best.
Unfortunately, (unless I’m missing something) it lacks the ability to load gcode files from a watch directory, and also the ability to enter arbitrary gcode commands, so I’m leaning toward using the Shopfloor Tablet interface.
The consequence of extra stuff isn’t space (to a point), it is mostly the additional complexity. But it is also cpu and memory resources, which may not have an impact until someone opens the address. I’m not sure.
I’ll try them out and see if I can even force the initial config before I worry too much about it.
My workflow so far is to use the main CNCjs interface to load the gcode from my computer, then go out to the machine and use tinyweb on my phone to set the machine position, reset 0, and start the job. I’m planning on using a modified shopfloor for the 7 inch touch screen on mine at the machine, at which point i’ll probably stop using tinyweb.
I’m liking the look of shopfloor. Would be easier than trying to use the standard web interface with my phone. Does it have a probe function for Z or the ability to add one? I’ve become pretty reliant on the probe.
hey thanks for this update(not sure if theres a newer way now) i have got it loaded in web browser, ive tried to use it with a 7" touch screen connected to pi (its a waveshare) i bought when i got my pi4 4gb to run octodash for octoprint, ive since changed to using it for cnc now. How could i run it with cncjs? ive followed your tutorial but when i go to restart the pi, im getting back to the desktop nothing loads up on the lcd like it should? im not sure where to go from here or its just not gonna work? haha thanks!~