HeeksCNC arcs

Hi, someone has reported to me that their machine ( built with a smoothie board ) is having trouble with arcs output by my HeekCNC 1.0 CAD/CAM software. The output it is making is fine for LinuxCNC; using G2 and G3 with the I and J parameters defining the centre point relative to the arc’s start point.

The smoothieboard documentation says that I and J are relative coordinates. Is this relative to the arc start point also?

Any ideas why the arcs might not be working correctly?

Can anyone give me some sample g-code with G2 and G3 moves which works correctly on smoothieboard, so I can produce similar code?

Dan Heeks.

Imported from wikidot

Hey !

That’s a bit weird, not sure what’s going on.

Here’s an example I found : 

( Made using CamBam - http://www.cambam.co.uk )
( lead-nut-mounts-inside-plywood 11/11/2011 3:42:49 PM )
( T0 : 0.32 )
G0 X0 Y0 Z0
G21 G90 G64 G40
G0 Z1.0
( T0 : 0.32 )
T0 M6
( inside )
G17
M3 S1000
G0 X3.84 Y18.0
G1 F4000.0 Z-0.1
G2 F2000.0 X2.58 Y17.2725 I-0.84 J0.0
G2 Y18.7275 I0.42 J0.7275
G2 X3.84 Y18.0 I0.42 J-0.7275
G0 Z1.0
G0 X5.2681 Y17.1755
G1 F4000.0 Z-0.1
G1 F2000.0 X5.7174 Y17.9536
G1 X5.705 Y17.9751
G1 X5.7174 Y17.9536
G1 X10.2826
G1 X10.295 Y17.9751
G1 X10.2826 Y17.9536
G1 X12.5652 Y14.0
G1 X12.59
G1 X12.5652
G1 X10.2826 Y10.0464
G1 X10.295 Y10.0249
G1 X10.2826 Y10.0464
G1 X5.7174
G1 X5.705 Y10.0249
G1 X5.7174 Y10.0464
G1 X3.4348 Y14.0
G1 X3.41
G1 X3.4348
G1 X5.2681 Y17.1755
G0 Z1.0
G0 X12.3843 Y10.5714
G1 F4000.0 Z-0.1
G2 F2000.0 X12.58 Y10.7275 I0.6157 J-0.5714
G2 X13.84 Y10.0 I0.42 J-0.7275
G2 X12.58 Y9.2725 I-0.84 J0.0
G2 X12.3843 Y10.5714 I0.42 J0.7275
G0 Z1.0
G0 X18.41 Y14.0
G1 F4000.0 Z-0.1
G1 F2000.0 X18.4348
G1 X20.7174 Y17.9536
G1 X20.705 Y17.9751
G1 X20.7174 Y17.9536
G1 X25.2826
G1 X25.295 Y17.9751
G1 X25.2826 Y17.9536
G1 X27.5652 Y14.0

Tell us if this helps.

Cheers.

I’m also having problems with arcs generated by HeeksCNC and executed by the Smoothieboard. Were you able to solve this? I also made a post here regarding the use of two digit (leading zero) g-code commands, that I suspect are causing this problem too. Some arc move commands may simply be dropped due to syntax. I end up getting pocket operations that have sections which appear to be shifted.

non working (direct from heekscnc):

(Created with emc2b post processor 2015/02/17 20:38)
(tool change to 3 mm Slot Cutter)
T1 M06 G43
G17 G90 G21
(Sketch 0)
G00 X87.83 Y87.83 S7000 M03
Z2
G01 Z-0.1 F100
G02 X86.415 Y86.415 I-0.707 J-0.707 F500
G03 X50 Y101.5 I-36.415 J-36.415
X-1.5 Y50 I0 J-51.5
X50 Y-1.5 I51.5 J0
X101.5 Y50 I0 J51.5
X86.415 Y86.415 I-51.5 J0
G02 X87.83 Y87.83 I0.707 J0.707
G00 Z5
T0 M06 M02

working:

(Created with emc2b post processor 2015/02/17 20:38)
(tool change to 3 mm Slot Cutter)
T1 M06 G43
G17 G90 G21
(Sketch 0)
G00 Z2
G00 X87.83 Y87.83 S7000 M03
G01 Z-0.1 F100
G02 X86.415 Y86.415 I-0.707 J-0.707 F500
G03 X50 Y101.5 I-36.415 J-36.415
G03 X-1.5 Y50 I0 J-51.5
G03 X50 Y-1.5 I51.5 J0
G03 X101.5 Y50 I0 J51.5
G03 X86.415 Y86.415 I-51.5 J0
G03 G02 X87.83 Y87.83 I0.707 J0.707
G00 Z5
T0 M06 M02

Changes made were adding G03 to each line of the circle. I also added G00 to the z move and then moved it up a line before the xy moves so the tool didn’t drag across the workpiece.

Hi,

(Created with emc2b post processor 2015/02/17 20:38)
(tool change to 3 mm Slot Cutter)
T1 M06 G43
G17 G90 G21
(Sketch 0)
G00 X87.83 Y87.83 S7000 M03
Z2
G01 Z-0.1 F100
G02 X86.415 Y86.415 I-0.707 J-0.707 F500
G03 X50 Y101.5 I-36.415 J-36.415
X-1.5 Y50 I0 J-51.5
X50 Y-1.5 I51.5 J0
X101.5 Y50 I0 J51.5
X86.415 Y86.415 I-51.5 J0
G02 X87.83 Y87.83 I0.707 J0.707
G00 Z5
T0 M06 M02

I think the reason why the Heeks CAD output is not working is because the lines after a G03 command for example are not indented by 1 space, which is required by Smoothieware to recognize that the command is G03 as well (The other option is as you mentioned to prefix each line with a G02/G03 etc.) .

But the last G03 line of the second code block doesn’t look valid to me:

G03 G02 X87.83 Y87.83 I0.707 J0.707

G03 followed by G02!?

yea, the last G03 G02 is my error (copy paste).
I believe the G02 is the leadout, so I most likely missed it visually.

EDIT: adding a space indent results in the same behaviour as my non working example.

Can you reproduce which steps are not executed? Maybe you can try adding a Dwell between the lines to see which lines are skipped.

The Z2 line is skipped and all li nes starting with X are skipped.
It executes the first G02 then begins the arc with the first G03 then executes the second G02 and returns to the start point. It should be drawing a full circle.

The NC code itself seems to be valid, just verified using this tool: https://nraynaud.github.io/webgcode/
It only says that G43 is an unknown command which seem valid to me as it doesn’t appear in the list of supported G-codes.

The code is also valid in OpenSCAM.

Maybe I should open a bug report with smoothieware?

You can make HeeksCNC 1.0 output g-codes on each move line.
The easiest way is to replace every “iso_modal” in file “emc2b.py” with “iso”.
On my computer, the file is at “C:\Program Files (x86)\HeeksCNC 1.0\HeeksCNC\nc\emc2b.py”

I hope this helps.

Dan.

Thanks Dan, that did the trick. If any linux users are looking for the file, its located at /usr/lib/heekscnc/nc/emc2b.py.