Starting Gcode issues with Dual Endstop Primo

So I worked out most of the kinks setting up my new Primo. The only one I am stuck on is with the starting Gcode Ryan recommends I was under the impression I position the machine where I want to start the cut then it will auto home then return to that spot, however, instead it always starts the cut at the 0,0 (bottom, left of the machine). Is this just the way it works and I have to fixture all my parts in the corner or is there a workaround. Also, for some reason when I issue G28 X Y X. It only home X and Z but when I issue G28 Y it does home the Y. Not sure if that related at all but my lack knowledge of Gcode is making it difficult for me to troubleshoot this one.

I think you are going to have to spell out some additional information go get reliable help. First, you are setup so that Z is up? This is Marlin? What specific GCode of Ryan’s are you executing? Is this a standard dual end stop setup?

I position the machine where I want to start the cut then it will auto home then return to that spot

No. Homing X,Y resets the current position to 0,0. The primary function of homing X,Y is to square the machine. Homing Z helps establish the relationship between the bit and the spoil board and is typically done separately.

1 Like

That won’t happen. You are talking about two things:

Homing is when the machine feels out for its endstop switches. The only reasons to do this are to adjust the offsets between the two steppers (auto squaring) or to just get the gantry out of the way.

Setting the origin, setting the 0,0,0, is different (homing does set the origin, but it sets it where you don’t want it). Ryan’s test crown has a G92 X0 Y0 Z0 at the top. Wherever the tool is when you start that gcode will be set to 0,0,0. But that gcode doesn’t include homing, and you need to add that to your gcode if you want it to automatically set the origin.

No, very few people use the workspace lower left as the origin. I wrote about coordinates in the docs, in the learn section. The strategy you should use, IMO (it’s your machine, do what you want), is to home after you turn on the machine, to get things square. Then jog out of the way and set up the material. Jog to the lower left corner, if that’s where you set origin in CAM. Move the bit to just touch the top surface and send G92 X0 Y0 Z0. Then start your job.

There are a lot of little tweaks you can do from the safety of understanding. For one thing, you can put the G92 in the gcode. You could also set just X, Y and then jog up, jog to the middle of the work, then jog down to the surface and set Z there, then up, then start your router and your job. Just adds a little accuracy to Z. Or you can attach a touchplate and probe that instead of setting it by jogging. Just don’t forget to account for the touchplate thickness.

Gcode is much easier than it looks, and I wrote a page in the docs for that too. There are about 10 commands you need to know to be really dangerous in gcode, and reads just like a book. You should take an hour and figure it out and play with it. You will benefit from the understanding tremendously.

Most people here do use Marlin, so that can pretty easily be assumed. The people who do use grbl usually know enough to mention that.

Yeah sorry, I should have mentioned it is Ryan’s pre-configured Marlin setup on a Rambo V1.4. My starting gcode in Estlcam is identical to Ryan’s starting gcode in the milling basics section. It starts with G92 X0 Y0 Z0 but then does G28 X Y Z which causes all the jobs to start in the 0,0 corner of the machine. If I don’t have G28 in the starting gcode/tool change gcode then won’t I end up with issues after a tool change? Sorry if I’m using the wrong terminology when discussing this.

I’m grasping what most of the common gcode commands do but I’m still trying to figure out how most people configure their starting and tool change gcode and what their work flow is.

It is different for everyone. I can detail everything I do, but I don’t use endstops. There are so many permutations, it gets complicated quick.

That doesn’t make any sense to me. I see what you’re saying, but that is a mistake, I think.

You can make your offset in cad. If you know your workpiece is 83,129 offset from your home, you don’t need to use G92 at all, you can just home and go.

Here is the guide I made for gcode:

https://docs.v1engineering.com/learn/gcode/

Ok, I figured there was some sort of issue with that. I was going to home x, y then place it over the material and home z but then I’m not sure how to reliably handle tool changes without losing the position that way.

My starting gcode looks like this currently:
G90 ; Absolute positioning, just in case
G92 X0 Y0 Z0 ; Set Current position to 0, all axes
G00 Z5.0000 F500 ; Raise Z 5mm at 8.3mm/s to clear clamps and screws
G28 Z; Home in order, w/zprobe
G92 Z0.5 ; Account for probe thickness (set your thickness)
G00 Z5.0000 F500 ; Raise Z probe off off of surface
M00 ; pause for LCD button press
M03 S; PID, set spindle speed

And my tool change gcode looks like:
M05 ; PID, Stop spindle
G0 Z35 F500 ; Raise Z axis 35mm
M84 ; Disable steppers
M00 ; Wait for LCD button press
;Change tool:
G28 ; Home in order, w/zprobe
G92 Z0.5 ; Account for probe thickness (set your thickness)
G00 Z5.0000 F500 ; Raise Z probe off off of surface
M00 ; pause for LCD button press
M03 S ; PID, set spindle speed

The starting gcode looks ok. The tool change code looks like you’re losing your xy position.

Yeah in the starting gcode I changed the G28 to G28 Z but I’m not sure how to reliably hold the x and y while changing the tool without rehoming. The tool changing is what I’m mainly hung up on rn.

I like doing separate gcode files. Just split them up. One for each tool. In between, you can jog wherever you want and it isn’t too hard to avoid skipping steps with two hands. Then you just jog back over to 0,0, and probe Z again. Just make sure you still have something to probe at the same height.

As long as you don’t disable the steppers, you don’t have to re-home X and Y at a tool change and you keep the X and Y home position relative to the stock. Personally I don’t do tool changes within the same file. I separate out all paths for a single tool and just run the next file after a tool change. My process is pretty manual and probably the hard way. Typically it requires knowing the Z height from the spoil board of the home point (usually the top left, front corner of the stock, or the top center point) as defined in the CAM file.

  • With the steppers still engaged, use the computer, LDC, or pendant to move the bit off the work piece and potentially up and change the bit.
  • Home the new bit against the spoil board.
  • Move the bit up to the Z height of the home point as defined in the CAM and set Z position to 0.
  • As necessary raise the bit to clear any clamps or unevenness in the stock
  • G0 X0 Y0
  • G0 Z0 F480
  • Run the next file

Sometimes (like when V carving) I’ll home Z against the top of the stock instead of the spoil board. This is simpler since X and Y can remain at 0,0, but for many paths any unevenness or error in the stock can result either in a cut not going all the way through the stock or cutting into the spoil board unnecessarily.