CNCJS CNC Control Software


(Griff Carpenter) #41

OK, I surprised myself. I managed to figure out how to copy/paste the macro into cncjs, don’t laugh, it’s not polite. :smiley:

So I screwed around a few minutes without the probe in place, got the expected error. But observed spindle moving in expected direction at expected speed.

When I tried with the probe the mill touched off the X but then it immediately jogged -Y, knocking the probe askew. Aborted at this point. I would expect that the mill would, upon touching X then back off slowly, then move slowly in -Y then slowly in +X then slowly in +Y to touch.

Tried once more, holding the probe in place with finger on E-Stop. Same issue, no back-off just zip-Y after touching X. The Y touch worked as expected but then the spindle jumped upward to the top of Z causing belt slip. Abort.

I’ll be interested to compare the revised g-code when you have time. Thanks again.


(Neil Ferreri) #42

Oops! My bad! I forgot to take your offset into account. I took off the 7mm after I wrote the macro, but didn’t account for that. Fixed one below… Using increment instead of absolute.


(Griff Carpenter) #43

OK, better but still hits top of Z, loss of steps, mill descends hits block and try’s to keep going.


(Neil Ferreri) #44

I’m sorry, @Griff. I should’ve waited until I could do this on a PC (I am now). Phones aren’t the best for editing gcode. This WILL work.

(start with the end mill about 15mm or less from bottom left corner. Z below surface of probe)

G21 ;make sure we’re in mm
G91 ;Incremental mode
G38.2 X20 F75 ;Probe W to the right 20mm
G10 L20 P1 X-10.175 ;Set current X location as negative half the bit diameter - 7mm thickness
G0 X-10 ;Move left 10mm
G0 Y-25 ;Move forward 20mm
G90 G0 X10 ;Move to X10 (absolute) - will put you 10mm to the right of left edge
G91 ;incremental
G38.2 Y25 F75 ;Probe Y
G10 L20 P1 Y-10.175 ;Set current X location as negative half the bit diameter - 7mm thickness
G0 Y-10 ;Move Y-10
G0 Z35 ;Move Z up 35mm
G90 G0 X10Y10 ;Move to X10Y10
G91
G38.2 Z-35 F75 ;Probe Z
G10 L20 P1 Z22 ;Set Current Z as 22mm - thickness of your plate
G0 Z10 ;Raise to 10mm above plate
G90
G0 X0Y0 ;Go to X0Y0


(Griff Carpenter) #45

No worries, im just happy to have the help.

So, I set the mill deeper in the collet. No more Z max, cool. BUT, mill descends hits block, bounces, stays down, drags the block sideways. Hmmm


(Neil Ferreri) #46

Is that with the most recent one?


(Griff Carpenter) #47

stay tuned, just saw it…


(Griff Carpenter) #48

Bingo!!

Still rises 20mm or so to high in Z but no hits/slips. I’m going to attempt an edit based on what I’ve learned today

Thanks again!!


(Neil Ferreri) #49

This one will probe Z first, so you don’t have to mess with changing distances. You can paste the stuff in parentheses with it as a reminder)

(start with the end mill 15mm ABOVE the plate, about 15mm or less from bottom left corner.)

G21 ;make sure we’re in mm
G91 ;Incremental mode
G38.2 Z-25 F75 ;Probe Z
G10 L20 P1 Z22 ;Set Current Z as 22mm - thickness of your plateG
G0 Z3 ;lift Z 3mm
G0 X-25 ;Move left 25mm
G0 Z-10 ;Move down 10mm, should be 7mm below probe surface
G38.2 X25 F75 ;Probe X to the right 25mm
G10 L20 P1 X-10.175 ;Set current X location as negative half the bit diameter - 7mm thickness
G0 X-10 ;Move left 10mm
G0 Y-25 ;Move forward 25mm
G90 G0 X5 ;Move to X5 (absolute) - will put you 5mm to the right of left edge of stock
G91 ;incremental
G38.2 Y25 F75 ;Probe Y
G10 L20 P1 Y-10.175 ;Set current Y location as negative half the bit diameter - 7mm thickness
G0 Y-10 ;Move Y-10
G0 Z10 ;Move Z up 10mm, should be 3mm above probe plate
G90
G0 X0Y0 ;Go to X0Y0


Triquetra 3-Axis Touch Plate for Shapeoko 3 Setup
(Griff Carpenter) #50

Thanks again Neil. This version works exactly the same as CM.

Would you mind sending me macros for rapid to front, center (for tool change) and rapid to Home? I have an XL btw.

Those two combined with the probe macro you sent should be enough to help me bootstrap my way up the macro learning curve.


(Neil Ferreri) #51

Glad it worked for you, Griff. For the Tool Change Location, I use a G28. You can just jog (X,Y, & Z) to where you want your tool change to be, send G28.1 to store that location, and then anytime you want to return there just send G28. You can do the same with G30. I use that for a “parking” position for removing/placing a workpiece.
If you’d rather not use G28 or G30 (maybe you’re using them for something else), I’d use machine coordinates to set a location. Something like:
G21 ;mm
G90 ;absolute
G53 G0 Z-5 ;raise Z to 5mm below limit switch
G53 X-415 Y-415 ;move to center of X and front of Y (XL)

I’m not near my machine, so I guessed on the “X-415 Y-415”

As far as a macro for rapid to home…do you mean actual home as in where the limit switches are?


(Griff Carpenter) #52

Hmmm, I’m going to do a bit more homework on this g-code stuff before I ask anymore questions.

It’s good to know enough to know which questions to ask before you start asking questions. Ha ha.


(Neil Ferreri) #53

@Griff
I made a new post regarding the tool length offset probe.