Corrupted firmware/groundcontrol using different versions weird G2/G3 cuts

This is probably caused by user error but I could not fix it.

TL;DR: Used wrong version of GroundControl with firmware, things got messed up, Weird G2/G3 cuts, don’t know how to fix. Tried re-flashing firmware.

I recently upgraded to firmware 1.2.4 and upgraded to same GroundControl version on laptop 1. Days later I grabbed the wrong laptop that had older GroundControl 1.2.1 and tried to use it. Immediately asked the sled to move to Home position and got the “wrong version error” and another error “Unable to find valid position for chain length”. Quit out of GroundControl.

Since the machine is at remote location, poor internet, I decided to downgrade firmware since I had 1.2.1 on the laptop. That did not work as version number remained 1.2.4. So downloaded firmware and groundcontrol 1.2.4, flashed the mega, and launched ground control.

Still had the “Unable to find valid position for chain length” error so did the automatic chain length calibration, resetting sprocket position and having the chains feed out. Moved the sled to work area extents to validate calibration settings were correct. Checked previous calibration settings. Everything looked good.

Start cutting and on first pocket cut < 1/4" depth get “Sled cannot keep up error”. Search for problem and see reference to Advanced settings -> Position Error Limit which I could have sworn was 20 and is now 2. See other issue that mentions upping it to 120. Latest firmware Sled not keeping up error. Set it at 20 with same result. Set it at 40 at which point it works.

Start cutting and go through about 4 different operations (drill, pocket, bore, outline pocket) which have no problem. Then get to outline cut for the exterior of the piece and G2/G3 cuts go horribly wrong. See image:

g2-g3-error-web

So the deep vertical cut (most right) goes down, and does “G3 X-9.9375 Y-7.4219 I0.125 J0” which cuts correct, then quick G1 straight cut to “G2 X-8.0625 Y-7.7969 I0 J-0.375” which messes up completely. Then does another straight cut followed by “G2 X-8.1875 Y-11.6719 I-0.125 J0” which does similar Z cut but to a lesser extent.

This is not error in sled movement due to friction, chain sag, uneven ring movement. The sled purposefully moves in this weird ‘Z’ cut instead of doing a smooth arc. Watched the chain movement and have video showing this but could not figure out how to upload it. If you have any insight on uploading images, video, code to this site please let me know as I have no idea how to do this.

Gcode looks correct, in text, GroundControl and ncviewer.

g2-g3-wierd-cut-ncviewer

So I exit out of GroundControl and re flash 1.2.4 firmware noting success message and reboot. Do power cycle to make sure. Restart GroundControl and attempt cutting again and see the same thing happen.

Any ideas of what has happened and how I can fix it?

Using default frame, default sled with ring, with default Ridgid router with z-axis, but slightly different weights (2x5 Lbs divers weights) which worked well before.

Offending Gcode: (Multi depth, max 1/4" per depth cut, with tabs)

(2D CONTOUR EXTERIOR)
G0 Z0.2894
G0 X-44.2124 Y12.6531
G1 Z-0.225 F13.1
G1 Y12.6528 Z-0.2289
G1 Y12.6519 Z-0.2327
G1 Y12.6504 Z-0.2363
G1 Y12.6483 Z-0.2397
G1 Y12.6458 Z-0.2427
G1 Y12.6428 Z-0.2452
G1 Y12.6395 Z-0.2473
G1 Y12.6358 Z-0.2488
G1 Y12.632 Z-0.2497
G1 Y12.6281 Z-0.25
G1 Y12.6031 F40.
G3 X-44.1874 Y12.5781 I0.025 J0
G1 X-8.1875
G2 X-8.0625 Y12.4531 I0 J-0.125
G1 Y8.7031
G2 X-8.4375 Y8.3281 I-0.375 J0
G1 X-9.9375
G3 X-10.0259 Y8.2915 I0 J-0.125
G3 X-10.0625 Y8.2031 I0.0884 J-0.0884
G1 Y-7.2969
G3 X-9.9375 Y-7.4219 I0.125 J0
G1 X-8.4375
G2 X-8.0625 Y-7.7969 I0 J-0.375
G1 Y-11.5469
G2 X-8.1875 Y-11.6719 I-0.125 J0
G1 X-44.1874
G2 X-44.3124 Y-11.5469 I0 J0.125
G1 Y12.4531
G2 X-44.1874 Y12.5781 I0.125 J0
G3 X-44.1624 Y12.6031 I0 J0.025
G1 Y12.6281
G1 Y12.632 Z-0.2497
G1 Y12.6358 Z-0.2488
G1 Y12.6395 Z-0.2473
G1 Y12.6428 Z-0.2452
G1 Y12.6458 Z-0.2427
G1 Y12.6483 Z-0.2397
G1 Y12.6504 Z-0.2363
G1 Y12.6519 Z-0.2327
G1 Y12.6528 Z-0.2289
G1 Y12.6531 Z-0.225
G0 Z0.125
G0 X-44.2124
G1 Z0.0394 F13.1
G1 Z-0.475
G1 Y12.6528 Z-0.4789
G1 Y12.6519 Z-0.4827
G1 Y12.6504 Z-0.4863
G1 Y12.6483 Z-0.4897
G1 Y12.6458 Z-0.4927
G1 Y12.6428 Z-0.4952
G1 Y12.6395 Z-0.4973
G1 Y12.6358 Z-0.4988
G1 Y12.632 Z-0.4997
G1 Y12.6281 Z-0.5
G1 Y12.6031 F40.
G3 X-44.1874 Y12.5781 I0.025 J0
G1 X-8.1875
G2 X-8.0625 Y12.4531 I0 J-0.125
G1 Y8.7031
G2 X-8.4375 Y8.3281 I-0.375 J0
G1 X-9.9375
G3 X-10.0259 Y8.2915 I0 J-0.125
G3 X-10.0625 Y8.2031 I0.0884 J-0.0884
G1 Y-7.2969
G3 X-9.9375 Y-7.4219 I0.125 J0
G1 X-8.4375
G2 X-8.0625 Y-7.7969 I0 J-0.375
G1 Y-11.5469
G2 X-8.1875 Y-11.6719 I-0.125 J0
G1 X-44.1874
G2 X-44.3124 Y-11.5469 I0 J0.125
G1 Y12.4531
G2 X-44.1874 Y12.5781 I0.125 J0
G3 X-44.1624 Y12.6031 I0 J0.025
G1 Y12.6281
G1 Y12.632 Z-0.4997
G1 Y12.6358 Z-0.4988
G1 Y12.6395 Z-0.4973
G1 Y12.6428 Z-0.4952
G1 Y12.6458 Z-0.4927
G1 Y12.6483 Z-0.4897
G1 Y12.6504 Z-0.4863
G1 Y12.6519 Z-0.4827
G1 Y12.6528 Z-0.4789
G1 Y12.6531 Z-0.475
G0 Z0.125
G0 X-44.2124
G1 Z-0.2106 F13.1
G1 Z-0.725
G1 Y12.6528 Z-0.7289
G1 Y12.6519 Z-0.7327
G1 Y12.6504 Z-0.7363
G1 Y12.6483 Z-0.7397
G1 Y12.6458 Z-0.7427
G1 Y12.6428 Z-0.7452
G1 Y12.6395 Z-0.7473
G1 Y12.6358 Z-0.7488
G1 Y12.632 Z-0.7497
G1 Y12.6281 Z-0.75
G1 Y12.6031 F40.
G3 X-44.1874 Y12.5781 I0.025 J0
G1 X-41.4874
G1 X-41.4374 F10.
G1 Z-0.625 F40.
G1 X-40.9374
G1 Z-0.75 F13.1
G1 X-35.4875 F40.
G1 X-35.4375 F10.
G1 Z-0.625 F40.
G1 X-34.9375
G1 Z-0.75 F13.1
G1 X-29.4875 F40.
G1 X-29.4375 F10.
G1 Z-0.625 F40.
G1 X-28.9375
G1 Z-0.75 F13.1
G1 X-23.4875 F40.
G1 X-23.4375 F10.
G1 Z-0.625 F40.
G1 X-22.9375
G1 Z-0.75 F13.1
G1 X-17.4875 F40.
G1 X-17.4375 F10.
G1 Z-0.625 F40.
G1 X-16.9375
G1 Z-0.75 F13.1
G1 X-11.4875 F40.
G1 X-11.4375 F10.
G1 Z-0.625 F40.
G1 X-10.9375
G1 Z-0.75 F13.1
G1 X-8.1875 F40.
G2 X-8.0625 Y12.4531 I0 J-0.125
G1 Y8.7031
G2 X-8.4375 Y8.3281 I-0.375 J0
G1 X-9.9375
G3 X-10.0259 Y8.2915 I0 J-0.125
G3 X-10.0625 Y8.2031 I0.0884 J-0.0884
G1 Y4.6281
G1 Y4.5781 F10.
G1 Z-0.625 F40.
G1 Y4.0781
G1 Z-0.75 F13.1
G1 Y-3.1219 F40.
G1 Y-3.1719 F10.
G1 Z-0.625 F40.
G1 Y-3.6719
G1 Z-0.75 F13.1
G1 Y-7.2969 F40.
G3 X-9.9375 Y-7.4219 I0.125 J0
G1 X-8.4375
G2 X-8.0625 Y-7.7969 I0 J-0.375
G1 Y-11.5469
G2 X-8.1875 Y-11.6719 I-0.125 J0
G1 X-10.8875
G1 X-10.9375 F10.
G1 Z-0.625 F40.
G1 X-11.4375
G1 Z-0.75 F13.1
G1 X-16.8875 F40.
G1 X-16.9375 F10.
G1 Z-0.625 F40.
G1 X-17.4375
G1 Z-0.75 F13.1
G1 X-22.8875 F40.
G1 X-22.9375 F10.
G1 Z-0.625 F40.
G1 X-23.4375
G1 Z-0.75 F13.1
G1 X-28.8875 F40.
G1 X-28.9375 F10.
G1 Z-0.625 F40.
G1 X-29.4375
G1 Z-0.75 F13.1
G1 X-34.8875 F40.
G1 X-34.9375 F10.
G1 Z-0.625 F40.
G1 X-35.4375
G1 Z-0.75 F13.1
G1 X-40.8874 F40.
G1 X-40.9374 F10.
G1 Z-0.625 F40.
G1 X-41.4374
G1 Z-0.75 F13.1
G1 X-44.1874 F40.
G2 X-44.3124 Y-11.5469 I0 J0.125
G1 Y-8.8469
G1 Y-8.7969 F10.
G1 Z-0.625 F40.
G1 Y-8.2969
G1 Z-0.75 F13.1
G1 Y-2.8469 F40.
G1 Y-2.7969 F10.
G1 Z-0.625 F40.
G1 Y-2.2969
G1 Z-0.75 F13.1
G1 Y3.1531 F40.
G1 Y3.2031 F10.
G1 Z-0.625 F40.
G1 Y3.7031
G1 Z-0.75 F13.1
G1 Y9.1531 F40.
G1 Y9.2031 F10.
G1 Z-0.625 F40.
G1 Y9.7031
G1 Z-0.75 F13.1
G1 Y12.4531 F40.
G2 X-44.1874 Y12.5781 I0.125 J0
G3 X-44.1624 Y12.6031 I0 J0.025
G1 Y12.6281
G1 Y12.632 Z-0.7497
G1 Y12.6358 Z-0.7488
G1 Y12.6395 Z-0.7473
G1 Y12.6428 Z-0.7452
G1 Y12.6458 Z-0.7427
G1 Y12.6483 Z-0.7397
G1 Y12.6504 Z-0.7363
G1 Y12.6519 Z-0.7327
G1 Y12.6528 Z-0.7289
G1 Y12.6531 Z-0.725
G0 Z0.25

GroundControl.ini (using 1.2.4)

[Computed Settings]
distperrot = 63.5
kpposmain = 1300
kiposmain = 0
kdposmain = 34
propweightmain = 1
kpposz = 1300
kiposz = 0
kdposz = 34
propweightz = 1
distperrotrightchaintolerance = 63.50000
kpvmain = 5
kivmain = 0
kdvmain = 0.28
kpvz = 5
kivz = 0
kdvz = 0.28
chainoversprocketcomputed = 2
fpwmcomputed = 3
kinematicstypecomputed = 2
distperrotleftchaintolerance = 63.50000

[Maslow Settings]
bedheight = 1219.2
motoroffsety = 425.1
sledwidth = 310
zaxissafeheight = 5
bufferon = 0
bedwidth = 2438.4
comport = /dev/ttyACM1
macro1_title = Macro 1
sledheight = 139
macro2 = 
macro1 = 
zaxis = 1
sledcg = 79
macro2_title = Macro 2
colorscheme = Light
zdistperrot = 3.17
motorspacingx = 2993.81

[Advanced Settings]
rotationradius = 119.0
chainextendlength = 1650
kiv = 0
gearteeth = 10
spindleautomate = None
kdvz = 0.28
chainsagcorrection = 34.351644
chainpitch = 6.35
chainlength = 3360
propweightz = 1
zencodersteps = 7560.0
maxfeedrate = 800
enablepospidvalues = 0
rightchaintolerance = 0
enablevpidvalues = 0
maxtouchprobeplungedistance = 0.0
kpvz = 5
kdposz = 34
chainoversprocket = Bottom
kpposz = 1300
fpwm = 490Hz
kdpos = 34
encodersteps = 8113.73
truncate = 0
homex = 0.0
homey = 0.0
kinematicstype = Triangular
kipos = 0
kdv = 0.28
kiposz = 0
digits = 4
kppos = 1300
kpv = 5
propweight = 1
positionerrorlimit = 2.0
kivz = 0
leftchaintolerance = 0

[Ground Control Settings]
zoomout = pagedown
centercanvasonresize = 0
viewscale = .45
zoomin = pageup
validextensions = .nc, .ngc, .text, .gcode

[Background Settings]
backgroundfile = 
manualreg = []

Using 3D models made in Rhinoceros v5, exported as IGES to Fusion 360, using MaslowCNC Post Processor to generate G-code, all of which previously worked well (except for teething problems I have already worked out). Tool feed rate is 1200mm/m from Fusion 360 recommended which I think is reduced to max Maslow rate 1000 (maybe 800) mm/m.

1 Like

I think I know what is causing this. Version 1.24 (which is officially released today) comes with an update to the way the effect of gravity on the chains is calculated which is great, but the change makes 1.24 not backwards compatible with 1.23. My guess is that when you are running 1.24 on both sides running Actions -> Advanced -> Wipe EEPROM followed by closing and reopening everything should fix the issue.

Great thx for the info @bar. Will try this over the weekend.

I wiped the EEPROM as suggested and then did full calibration. Tried cutting the gcode again and had same issue. Just to be safe I wiped EEPROM again, then Flashed 1.2.4 firmware, then full calibration, as still had the same problem.

Looking very closely at the movement of the sled I figured out what is happening. The G2 cuts are turning in the wrong direction. Instead of going clockwise they are going counterclockwise.

In the first image above the “G3 X-9.9375 Y-7.4219 I0.125 J0” cuts a quater turn counterclockwise. This results in the end of the cut being 0.75" to left of where it should be. This board compensates for this by doing G0 movement, to the beginning of the next cut, but because it moves so fast it ends up in a distorted cut which is why it looks sort of rounded. The same thing happens on the next G2 but to lesser extent because the arc has much smaller radius.

The Gcode is correct. The firmware is executing it wrong.

Fusion360 has an option to interpolate G2/G3 operations is the Post Processor named “Disable Arcs”. When I ran new gcode it cut perfectly. In fact it cut way better compared to when G2/G3 was working previously because it reduced the feedrate during the arc.

So I have a work around but would still like to see this fixed. Should I report this on GitHub?

I must be misunderstanding, I think the G3 code is supposed to cut counterclockwise. Are you saying that the firmware cuts clockwise for this line?

Glad to hear that your workaround ( “Disable Arcs” in Fusion360 Maslow processor, right?) has you running again.
The issue appears to be in the way that the arc() function handles the G2 cut; the G3 cut is correct. I’ll open an issue to address it.

Firmware PR#477 addresses this problem. With the patch, the Offending Gcode listed above runs correctly. The comment to the PR also contains a shorter sample of gcode that demonstrates the issue and the fix.

@tinker, I’m sorry that my earlier PR introduced the error and caused you so much frustration. Thank you for your patience and the information that brought it to light and helped to correct it.

3 Likes

@blurfl Yep sorry I copied the wrong line. Meant to say the it was the “G2 X-8.4375 Y8.3281 I-0.375 J0” cuts a quarter turn counterclockwise. Thanks for the quick fix. Any idea when this might get committed to Master so I can update the firmware?

1 Like

We’re on a monthly update cycle, so the next official release will be December 1. Until then, here is a zip file containing a corrected version of Firmware-v1.24:
Firmware-v1.24-Issue-476-G2-gcode-error-corrected.zip (84.9 KB)

1 Like

Great thx @blurfl. WIll test this out this week.

1 Like

Please do, and let us know if it works - we can do an early release if it’s good.

1 Like

I just want to bump this. Any progress?

Yes, there was a report of a successful test, so I think we should be good to
merge this.

David Lang

1 Like

It was confirmed by @strebor here, so it seems good to go. :+1:t2:

1 Like

Sorry for lack of reply. Was all set to do a test cut but ran out of time as I needed to get a project done.

Made up gcode to test all iterations of clockwise and counter clockwise cuts:

(TEST-G2-G3)
(T1  D=0.25 CR=0 - ZMIN=-0.2 - FLAT END MILL)
G0 G40 G90
G20

(CLOCKWISE)
T1 M6
M3 S10000
G0 X-0.3 Y0.025
G0 Z0.25
G0 Z0.125
G1 Z-0.175 F13.
G1 X-0.3003 Z-0.1789
G1 X-0.3012 Z-0.1827
G1 X-0.3027 Z-0.1863
G1 X-0.3048 Z-0.1897
G1 X-0.3073 Z-0.1927
G1 X-0.3103 Z-0.1952
G1 X-0.3137 Z-0.1973
G1 X-0.3173 Z-0.1988
G1 X-0.3211 Z-0.1997
G1 X-0.325 Z-0.2
G1 X-0.35 F20.
G3 X-0.375 Y0 I0 J-0.025
G1 Y-0.5 F30.
G2 X-1 Y-1.125 I-0.625 J0
G1 X-2
G2 X-2.625 Y-0.5 I0 J0.625
G1 Y0.5
G2 X-2 Y1.125 I0.625 J0
G1 X-1
G2 X-0.375 Y0.5 I0 J-0.625
G1 Y0
G3 X-0.35 Y-0.025 I0.025 J0 F20.
G1 X-0.325
G1 X-0.3211 Z-0.1997
G1 X-0.3173 Z-0.1988
G1 X-0.3137 Z-0.1973
G1 X-0.3103 Z-0.1952
G1 X-0.3073 Z-0.1927
G1 X-0.3048 Z-0.1897
G1 X-0.3027 Z-0.1863
G1 X-0.3012 Z-0.1827
G1 X-0.3003 Z-0.1789
G1 X-0.3 Z-0.175
G0 Z0.25

(COUNTERCLOCKWISE)
G0 X0.3 Y0.025
G0 Z0.25
G0 Z0.125
G1 Z-0.175 F13.
G1 X0.3003 Z-0.1789
G1 X0.3012 Z-0.1827
G1 X0.3027 Z-0.1863
G1 X0.3048 Z-0.1897
G1 X0.3073 Z-0.1927
G1 X0.3103 Z-0.1952
G1 X0.3137 Z-0.1973
G1 X0.3173 Z-0.1988
G1 X0.3211 Z-0.1997
G1 X0.325 Z-0.2
G1 X0.35 F20.
G2 X0.375 Y0 I0 J-0.025
G1 Y-0.5 F30.
G3 X1 Y-1.125 I0.625 J0
G1 X2
G3 X2.625 Y-0.5 I0 J0.625
G1 Y0.5
G3 X2 Y1.125 I-0.625 J0
G1 X1
G3 X0.375 Y0.5 I0 J-0.625
G1 Y0
G2 X0.35 Y-0.025 I-0.025 J0 F20.
G1 X0.325
G1 X0.3211 Z-0.1997
G1 X0.3173 Z-0.1988
G1 X0.3137 Z-0.1973
G1 X0.3103 Z-0.1952
G1 X0.3073 Z-0.1927
G1 X0.3048 Z-0.1897
G1 X0.3027 Z-0.1863
G1 X0.3012 Z-0.1827
G1 X0.3003 Z-0.1789
G1 X0.3 Z-0.175
G0 Z0.25

G0 Z0.25
M5
M30

Will test this weekend to confirm @strebor’s results.

2 Likes

Any update on this?
Sounds like the same issue I hit. Updated my GC to [EDIT] 1.25 and tried to run it with the TLE5206 & firmware 1.22 - leading to chaos.(failed motor tests, wrong rotation directions, etc)

I didn’t see this thread till today so I’ll try the wipe EEPROM, but failing that, I’m not sure what firmware I should flash, or if I should leave it at 1.22 and try to figure out how to downgrade to GC 1.21.

I tried the wipe, but am still getting L&R motor fails on direction 1. Moving on to updating the FW to the on @blurfl posted above…

The FW-v1.24-Issue 476 zip file that @blurfl posted above seems to be missing libraries (like servo.h) - is it safe to assume that if I hunt them down from previous builds, they will be fine?

That’s puzzling, I just downloaded the file from this link as above and it compiles correctly. No need to move any files, just double-click on cnc_ctrl_v1.ino to open it in the Arduino IDE and as a double-check note that there are many more than one tab across the top of the IDE window.

That’s what I did too.

As per a different thread, I moved the header files from \utility into the same folder as cnc_ctrl_v1.ino and changed the include statements to remove the “utilities/” before them.
That got rid of the include errors, but created a slough of “String(float, int) is ambiguous” errors - so that’s not right.

The header files are there, but for some reason the arduinoIDE doesn’t find them when it tries to compile. Perplexing.

Not sure where that is, but moving files isn’t necessary with the Arduino version of the firmware. As you’ve found, it prevents the files from compiling.