CNCJS CNC Control Software

@neilferreri Incredibly thankful for all your help.I will test all this next week when back home.

Just tried this macro on a piece of aluminum. At the end it goes to 0,0,0…you would not want to do that automatically with a touchplate because 0,0,0 is under the touchplate. I might have to make my own corner touch plate now!
G21
G38.2 X12.7 F75
G92 X-3.175
G0 X-10
G91 G0 Y-20
G90 G0 X10
G38.2 Y20 F75
G92 Y-3.175
G0 Y-10
G91 G0 Z20
G90 G0 X20Y20
G38.2 Z-20 F75
G92 Z0
G0 Z10
G0 X0Y0
G1 Z0 F75
https://photos.app.goo.gl/ZJQsErpErOdsqSgU2

4 Likes

So cool!!!. Thanks for the video @neilferreri. I’m flying home today and will start playing tomorrow with all the macros you have been so kind to share. I am very excited to make CNCjs part of my workflow. Seems like i will allow me all the flexibility i want.

1 Like

Happy to share…you’ve pushed me to probe more.
Milling a piece of aluminum today. Different machine (1/8" end mill), and I wanted the XYZ zeros to be permanent. I used G10 L20 instead of G92.
Here’s the macro (again no probe plate, just metal stock…to make a probe plate!)

(start with the end mill about 10mm or less from bottom left corner. Z below surface)
G21 ;make sure we're in mm
G38.2 X12.7 F75 ;Probe W to the right 12.7mm
G10 L20 P1 X-1.5875 ;Set current X location as negative half the bit diameter
G0 X-10 ;Move left 10mm
G91 G0 Y-20 ;Move forward 20mm
G90 G0 X10 ;Move to X10 - will put you 10mm to the right of left edge
G38.2 Y20 F75 ;Probe Y
G10 L20 P1 Y-1.5875 ;Set current X location as negative half the bit diameter
G0 Y-10 ;Move to Y-10
G91 G0 Z20 ;Move Z up 20mm
G90 G0 X10Y10 ;Move to X10Y10
G38.2 Z-20 F75 ;Probe Z
G10 L20 P1 Z0.2 ;Set Current Z as 0.2mm - I was facing a piece of aluminum
G0 Z10 ;Raise to Z10
G0 X0Y0 ;Go to X0Y0

2 Likes

Used your last macro and it works as expected. I am starting to make a little sense of how GCode works. This, eventually, when taking into consideration a touchplate dimensions will give you WCS zero. I like this design of touchplate:

http://www.themakersguide.com/home/products/triple-edge-finder-2

If I understood correctly, you don’t need to input bit dimensions to get the zero position with this design.

What I would love is to use a touchplate like this to get my WCS zero at the beginning of a job and then use the tool length probe in my Nomad to calculate tool length after tool changes. This would allow me to not have to reconnect my touchplate again after the initial setup. Just a matter of elegance in the workflow. I already have the tool probe so why not use it. I have the mechanics to send the machine to probe, but the stored values are all wrong. Need to understand how to store values and then use them to make calculations.

What is the difference between G54 (WCS) and G92 (Temporary offsets)?. Are G92 codes used as temporary numbers for calculations?.

All this feels like learning Chinese. I get the gist of things but still can’t make sense yet of how to make things work. I get that it’s very simple math but can’t figure out where all the calculations happen.

I’m glad that you are so generous with your knowledge. I am the same way. If there is any way I can help you with anything, please don’t hesitate to ask. Also, I like using the forum because other people might learn something from our ramblings but if you prefer we can move into private messaging.

You’d still need to account for your bit diameter. A 1/16" bit used as an XY corner probe will cause the router to be much closer to the corner of your stock than a 3/4" face mill. The distance would be the thickness of the probe + half of your bit diameter. For Z, your bit doesn’t matter…the bottom of a bit is the bottom of a bit, regardless of diameter.

Like I said, I’m not familiar with the Nomad’s probe. How does that work?

CNC worm hole here: (From a post of mine in another forum)
Basically, you have your machine coordinate system (G53), and nine available work coordinate systems, or WCS, that are a known offset from the machine coordinate system. You can set your origins for each of those WCS easily by jogging to the location you want and sending “G10 L20 P*** X0 Y0”. The *** in this case would be the number for the WCS you are setting the XY origin for. P1 for G54, P2 for G55, and so on. All of this requires homing first, so the machine knows where it is.
Let’s say I make a lot of bottle openers and I mill a lot of PCBs. I have a square mounted to my machine to set my 1x6 for the bottle opener and somewhere away from that, I have a small pocket to set in my PCB blank. I could set my G54 origin to my desired work zero for my bottle opener by jogging there and sending “G10 L20 P1 X0 Y0” (you could add a Z0 if you know you won’t need to probe). i can jog to my PCB pocket and send “G10 L20 P2 X0 Y0 Z0” to set my G55 work origin. From now on, after I home and when I’m in the G54 (usually default) WCS, I can send G0 X0 Y0, and my machine will go to the same spot. You could actually just start your carve from wherever your home is and it will still use the correct work origin. Just home your machine and carve. When I’m ready to mill the PCB, I’ll make sure my gCode is is set up for the correct WCS (G55), home, and carve.
Be cautious when using the different coordinate systems. You may have everything set up for your G55 origin, but if your gcode has a G54 in the header (again, default), you’re machine will carve in that WCS. You may think Z3 is 3mm above your workpiece, but if you’re in the wrong WCS it may be closer to the bottom of your workpiece. You can change from working in one WCS to another by sending G55 or G57 or G54 or whatever.

I’m sure there are videos and diagrams out there that will help illustrate. When I’m working with my CNC at home it tends to be quick and dirty…I have a 3yr old and 1yr old, and I can only do so much during a nap time. After they’re in bed, I’m in no condition to operate machinery.

Think of G92 as an offset of the whole thing. All of your work coordinate systems get shifted with a G92. I try to avoid it as it’s temporary. If I used G10 to set my zero, and the power goes out, I can just home and carve when it kicks back on. If I used G92, and didn’t record the current machine coordinate values, I just wasted my stock. Unless I have a 3-axis probe…then I can secure that piece anywhere, probe and carve.

I teach middle school, so it’s nice to talk about this stuff without someone asking “what would happen if I put my hand in there?”

3 Likes

Really though, what would happen? I’m 46 years old and my middle school teacher never answered that question, but I’ve “almost” worked up the nerve to give it a try :wink:

In all honesty though, this is a really great post and I’m slowly learning a lot, thank you for your time!

Dan

1 Like

Here is a small video trying to explain what my question is and how the Nomad Classic probe works:

Here is how my macro is after the coordinates for my probe:

; Z-Probe
G53 X[-220]
G53 Z [-42]
G91
G38.2 Z-55 F150
G90

; Set the active WCS Z0
G10 L20 P1 Z10

; Retract from the touch plate
G91
G0 Z55
G90

My new Z axis, now under construction, has necessitated the learning of yet more software, :rage:, not my favorite way to spend my time. But, invest I must.

So, to the point, is there a “best” way for a person with zero “$” ability/knowledge to learn CNCJS?

Oh, and thanks for posting @patofoto I’ve been looking about for a few weeks now at different g-code senders and was immediately impressed by CNCJS’s interface and organization.

3 Likes

Hey there @Griff. Glad more people are learning. I find that there is not much to learn with GCode senders. They pretty much all perform the same duty with different interfaces and bells and whistles. I think our main limitation is our control board. It uses GRBL and, it’s my impression, is on the basic end or control for CNCs. Mach3 seems to be more powerful for example. GRBL is all I’ve ever used so it’s only my impression.

CNCjs has a great interface and with knowledge of GCode you can mimic all the functionality of Carbide Motion and probably more. This is why I have started this thread. I am a little disillusioned with Carbide3D and their probe. I love my Nomad and Carbide Motion but feel I could no more with CNCjs.

Using CNCjs you will have to get comfortable with how your workflow needs to change. Carbide Motion automates a lot of things for you and makes it almost foolproof. You can, with Macros, have the same functionality as any GCode sender, I think. It’s a matter of just getting used to it. Not a lot to re-learn, just a new order of things. It will give you more flexibility in the end. Once I have it figured out, I will post a tutorial on my process for anyone interested. Thanks to @neilferreri I am getting very close. All the mechanics are there. I need to figure out how some calculations are made and where those values get stored for everything to work as we expect in Carbide Motion.

I switch to cncjs about 9 months ago are so and really enjoy using much better that UGCS. I had some issues with UGCS with large gcode files over 1 million lines of instrutions. With CNCJS I have sent some jobs taking upto 20 hours with no issues. The developer is very open to changes and new features and easy to communicate with you with issues and concerns.

2 Likes

Good intro to GCode programming:

I just saw your video showing the Nomad, @patofoto. Now I get what you mean. That’s gonna be a different type of probe, but I believe CNCjs can handle that in a macro.
I’ll put something together after we get the kids to bed. Also giving me ideas for my SO3. :thinking:

1 Like

Thank you so much @neilferreri!. As I’m looking at videos and some tutorials on GCode, I am getting excited to learn it more. The second video I posted is so didactic. I need to find a GCode editor that can show me a preview of what I’m doing like in the video. Anyone have any advice on any for macOS?. I know of GWizard Editor but it’s a little too expensive for me at the moment.

Thanks for the replies.
I’m working my way through the cncjs wiki now. I’ll check out the video later this pm.

I’m one of the fortunate few to have snagged a C3D probe on the first go round. I’d be interested to see a macro (I have a vague recollection of what they are) for use with cncjs.

1 Like

Hey @Griff,
Do you know the offset distances for the Carbide probe? I could show you how the macro (basically a block of code) above would work.
I’m waiting to hear back from @patofoto on the location of the Nomad’s tool length offset probe, and then I’ll share one for him to try.
I thought it’d be cool to have a probe plate pocket in the wasteboard of the SO3. Basically what I’m thinking would be to use my corner probe to get my initial 0,0,0. Then I’ll drop my probe block into its pocket. When I need a tool change, I could use the plate (in its pocket) to set my tool length offset.
I’m going to have some aluminum milling questions I’m sure as I try to make my own corner block probe.

Hey @neilferreri. In the Nomad, the Y position is irrelevant since the bed moves for Y positioning. The spindle only has to move on X to reach the probe.

1 Like

:flushed:
I’ll understand if you disregard anything I say from now on.
How about a good tool change position in machine coordinates?

The probe is at X-220 in my Nomad. Is that what you need?. That is the machine coordinate. After I run the macro I get this.