So I finally got my machine on line and ready to cut. I made a baseboard job and set it going. Immediately I get the error in the title GRBL Error: The motion command has an invalid target. G2, G3 and G38.2 generates this error, if the arc is impossible to generate or if the probe target is the current position. Here is the code up to the failure point: (Tooling at row 1, column 1.) (Advance to inside left edge) G0 X1.71 Y9.50 (Lower the spindle) G1 Z-1.85 F100 (Draw circle at [9.5,9.5] iteration 1, depth 1.85 accounting for tool width) G2 X17.30 Y9.50 I7.80 F400 G2 X1.71 Y9.50 I-7.80 F400 The error throws on the first G2 line. It performs on the simulator fine, and it sometimes! performs on the board. IOW, the probe target is not the current position and it is not impossible to generate. What am I missing? Do I need a GRBL update?
For the spoilboard I use the wizard in OpenBuilds Control. For CAM I use either Fusion 360 or Vectric. Both have post processor that are compatible with grbl: docs:software:cam [OpenBuilds Documentation] The Fusion post has specific code that prevents the arc errors. If you google grbl arc errors you'll get a idea of what causes them and how to fix them.
Your app isnt generating valid arcs. Either too much rounding, not enough decimals, or the math is just way off.
Good answer. I did use rounding. How accurate does it need to be? I've rewritten to three decimal places, which is a micron. I'll try later today.
G2 and G3 must have X Y I and J words, always, it is moaning about not having a J word. also make sure you are using incremental mode for the I and J words since that is what GRBL uses.
J is always 0, and it seems to work without a J word. I think the problem is that I lack decimal places.
How accurate is needs to be depends on the radius of the arc. More accurate for small arcs. This is because GRBL checks for errors by comparing the 2 radii it calculates to be within a few percent of each other.
'seems to work' is not the same as 'always works' (-: I advise putting in the J word now so that in a years time when you modify the code you will be reminded that it is needed. Self documenting code is the best code, because we programmers don't write documentation! <-: