CNCJS CNC Control Software

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.

2 Likes

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.

2 Likes

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

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

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

Is that with the most recent one?

stay tuned, just saw it…

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!!

1 Like

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

3 Likes

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.

1 Like

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?

1 Like

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.

1 Like

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

2 Likes

@neilferreri, when you have a minute could you set me up with a macro for Tool Change in CNCjs?

I’ve looked at the instructions for doing this but have no confidence I’d do it correctly. Thanks.

@Griff The one I posted in the other thread worked really well for setting the tool length offset. I’ve since shortened the routine. Unfortunately, every attempt at making a video hasn’t gone well. I need more hands or a tripod and some patience. I’ll see if I can get a quick and dirty one together.
What were you hoping the macro would do?

The problem I have is I’m working from a position of complete ignorance.

I ran the macro you posted, it moves the spindle to the front, left and then, very slowly, descends and fails.

Does this help?

I can’t even figure out how to manually set z-zero!

@Griff I’ve got a video uploading to youtube with a basic demo. I’ll update with a link when it’s ready.
I don’t know why you got that probe fail, but I didn’t see the macro prompts anywhere. Did you click continue? at each program pause?


I’ll update the other thread with the most recent macro as well.
2 Likes

Keep up the good work! I also am in love with cncjs, just discovered it and was asking the same questions you are now. I will do my best to contribute to get this probing stuff to work.

Have you figured it out? or are you still stuck at a certain spot. I’d love to continue where you left off. I have a friend who is a retired machinist who could help. I can definitely pick his brain about this ( was going to anyway)

2 Likes

@Luke, i thought I’d move the discussion here so we don’t hijack the thread about the Z-axis upgrade.

Not in the GUI, but easily done with a macro.

One of the reasons I like it so much. I’ve tried all of the free senders, and the dev for cncjs (@cheton) has been constantly making improvements and taking suggestions (almost to a fault). Once it gets an auto-leveling widget, I don’t see why i’d need anything else.

Feedrate, Spindle Speed, and Rapid overrides.
image

3 Likes