Advice on custom alternative to Easel for driving X-Carve

Hi,
I’ve had my X-Carve for several years and have thoroughly enjoyed it. Until recently my setup was in my basement with a long USB cable between pc and my machine and that has been fine. We recently moved, and I will not have that convenience. I still use EASEL, but I’m writing my own GCode sender in C so I can just transfer the gcode.nc file (created by Easel) to a Pi and push the content of that file to my X-Carve.
I was able to easily convert https://github.com/grbl/grbl/blob/master/doc/script/stream.py into C and I thought I was done. I tried sending a simple gcode file to my machine and I realized there are probably a few details that I need to tend to first…

  1. I assume there is something I need to do so that wherever I put my cutter, that becomes “x=0,y=0,z=0” relative to the current workpiece.
  2. I guess I also have to establish the settings also or does that become part of the gcode file created?

I’m sure others have already done this, and yea I could just use something already out there,
but this is kinda fun. Any thoughts on what else I need to do?

Thanks for any pointers…
Ed

Hmm… I looked closer at the gcode file created by Easel, and it appears that the settings (feed-rate, plunge-rate and depth-per-pass) are just built into the commands, so maybe I just need to know how to set up a relative x=0,y=0,z=0 position, true?

there are a few PI senders already out there as opensource that many use. Since the X-Carve is basic GRBL you only need a PI Grbl based Gcode sender.

If you are set on making your own you might want to take another and see how exactly they set it up instead of reinventing the wheel, maybe you can borrow some idea from existing ones. :man_shrugging:
Just my 2 cents on it.

Also, maybe this is what you need? but Im not sure i 100% understand what your issue and goal ultimately is, so this link may prove useless to you ? G54, G52, and G92 G-Codes [Work Offsets for CNC Fixtures]

Certainly not trying to re-invent anything, just doing this as an exercise to force myself to get to know the machine a bit better. I believe I have the “sender” working (just a python-to-C conversion of the python script from Grbl CNC controller · GitHub); I just don’t get how to adjust the starting point.
Its these kinds of questions I didn’t even realize I didn’t know; hence, this is a good exercise for me.
Thanks,

1 Like

@SethCNC , Hmmm… looks like “work offsets” may be what I am looking for!
Thanks much, I’ll post back with results…

1 Like

Well, I said I’d report back, but its only to say I’m confused.
After more experimenting I realized that only the Z axis was incorrect…
My orientation was 90 degrees off, so the xy motion looked bad, when in fact it was perfect.
Then I decided to just run with a USB cable connected directly to EASEL to make sure that
my machine was fundamentally working properly… That worked fine.
Then I went back to using my program and it worked properly too.
Its been working ever since.
No clue why…

1 Like

G10L20X0Y0Z0

What settings are you referring to?
Grbl, machine, $$ settings are stored on the microcontroller’s eeprom and will remain until you explicitly change them.

Things like feedrate & spindle speed need to be in the gcode file.
Units, work coordinate system, motion modals, etc. Can be in your program or just use the Grbl defaults.

Regarding settings… got it… I see that the stuff I would normally set in EASEL is actually part of the GCODE file that it produces. I didn’t realize that.
Regarding G10 command…
I never did that, but I’ve been able to cut correctly each time I’ve tested (since yesterday)…
Here’s my hunch (please verify if you know)… When my program attaches to grbl, it sends
\r\n\r\n; which apparently initializes GRBL. My guess is that at that point it does the equivalent
of G10L20X0Y0Z0. Does that make sense?
Thanks,

No homing switches?
Without homing, your machine has no idea where machine zero is. It will set the location at startup as machine zero. Work zero is established as an offset from machine zero. Unless explicitly set previously, those offsets will all be zero making work zero and machine zero the same.

No homing switches?

No. It had limit switches but I removed that wiring as it appeared to cause noise problems with the machine (haven’t had an issue since).

Without homing, your machine has no idea where machine zero is. It will set the location at startup as machine zero. Work zero is established as an offset from machine zero. Unless explicitly set previously, those offsets will all be zero making work zero and machine zero the same.

Ok, so that matches what I am seeing. So as long as I don’t manually move the cutter after I turn on GRBL, everything is working. That’s a safe limitation because I never move the tool with the controller powered up anyway.
Thanks much for the clarification. I think I’m good to go.

1 Like

I’m a bit confused. Why not just get cheap laptop and use that with the xcarve? No need for any long cables.

Yep, very logical question…
I enjoy programming, I had a few spare Pi’s in the drawer, so I figured I’d take a shot at this.
So far its working well, and I’m learning (a bit more than I would have otherwise) about gcodes.
Tx

I export the gcode from Easel and use the free Universal Gcode sender (UGS) to do the actual carve. I started doing this because there seemed to be a problem with some Z axis movement using Easel. On one of the YouTube demos I watched, they said there was/is a known with Z axis in Easel. The video was several months old so I don’t know if that has been corrected or if it was even true, but, I know I get better results with UGS.

yep!! UGS is the way to go . to many hiccups using easel …

Easel will edit the grbl settings on the cnc controller ONLY IF an X-Carve is selected during the machine setup process.
So long as the “other grbl cnc” (the photo of the 3018 CNC) is selected then the $102 is not edited during the setup. I’ve connected 5 non- x-carve cnc’s and 0 of them have had the $102 chagned. :man_shrugging: It’s just human error of people selecting X-carve when they don’t have one, then again I don’t think it should be changing anything without positive authorization from the user. BUT at least its if the correct cnc is selected it’s a non-issue…
.

Granted I also use an external sender, but it is more for all the additional feature vs any settings issues caused by easel… I prefer OpenBuilds Control, but I’ll acknowledge UGS as a solid 2nd in my opinion.