# Groundcontrol closes unexpectedly upon connecting to arduino

**URL:** <https://forums.maslowcnc.com/t/groundcontrol-closes-unexpectedly-upon-connecting-to-arduino/5636>\
**Category:** Troubleshooting\
**Created:** [August 11, 2018, 2:08pm UTC](https://forums.maslowcnc.com/t/groundcontrol-closes-unexpectedly-upon-connecting-to-arduino/5636 "2018-08-11T14:08:34Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![rayner\_tavera](https://yyz1.discourse-cdn.com/flex031/user_avatar/forums.maslowcnc.com/rayner_tavera/32/13202_2.png) [@rayner\_tavera](https://forums.maslowcnc.com/u/rayner_tavera)\
**Post date:** [August 11, 2018, 2:08pm UTC](https://forums.maslowcnc.com/t/groundcontrol-closes-unexpectedly-upon-connecting-to-arduino/5636/1 "2018-08-11T14:08:34Z")

</div>

Help! My groundcontrol software closes unexpectedly upon connecting to the arduino. By some quick printscreens, I got a screenshot of the error before it closes.

 ![maslow](https://canada1.discourse-cdn.com/flex031/uploads/maslowcnc/original/2X/3/3a1cddc7df6f9f4c417c829a809c367d0153caaf.jpeg)

---

<div class="post-metadata">

**Author:** ![Gero](https://yyz1.discourse-cdn.com/flex031/user_avatar/forums.maslowcnc.com/gero/32/17487_2.png) [@Gero](https://forums.maslowcnc.com/u/Gero)\
**Post date:** [August 11, 2018, 2:21pm UTC](https://forums.maslowcnc.com/t/groundcontrol-closes-unexpectedly-upon-connecting-to-arduino/5636/2 "2018-08-11T14:21:53Z")

</div>

Welcome, how did the firmware upload go? Is this firmware and GroundControl 1.18? Is the come port the same as the Arduino IDE used? Did you restart GC? Is the Arduino IDE closed when you start GC?

---

<div class="post-metadata">

**Author:** ![rayner\_tavera](https://yyz1.discourse-cdn.com/flex031/user_avatar/forums.maslowcnc.com/rayner_tavera/32/13202_2.png) [@rayner\_tavera](https://forums.maslowcnc.com/u/rayner_tavera)\
**Post date:** [August 11, 2018, 2:29pm UTC](https://forums.maslowcnc.com/t/groundcontrol-closes-unexpectedly-upon-connecting-to-arduino/5636/3 "2018-08-11T14:29:42Z")

</div>

Hiya!

how did the firmware upload go?

> > Not bad, the arduino program completed and said upload complete.

Is this firmware and GroundControl 1.18?

> > Firmware and GC ver 1.19 both

Is the come port the same as the Arduino IDE used?

> > yes, both at com6. lower right of screenshot confirms this and says its connected.

Did you restart GC?

> > yes couple times already. doesn’t close if i don’t connect the arduino.

Is the Arduino IDE closed when you start GC?

> > yes closed. even went into task manager to check

---

<div class="post-metadata">

**Author:** ![Gero](https://yyz1.discourse-cdn.com/flex031/user_avatar/forums.maslowcnc.com/gero/32/17487_2.png) [@Gero](https://forums.maslowcnc.com/u/Gero)\
**Post date:** [August 11, 2018, 2:35pm UTC](https://forums.maslowcnc.com/t/groundcontrol-closes-unexpectedly-upon-connecting-to-arduino/5636/4 "2018-08-11T14:35:23Z")

</div>

Is this the windows portable GC?  
Any additional clues in the command window?

 ![image](https://canada1.discourse-cdn.com/flex031/uploads/maslowcnc/original/2X/7/7aa94ecbf8dbec777cf9f44cb51a734900c12f0f.jpg)  
Edit: Can you locate the log.txt in the GC folder?

---

<div class="post-metadata">

**Author:** ![rayner\_tavera](https://yyz1.discourse-cdn.com/flex031/user_avatar/forums.maslowcnc.com/rayner_tavera/32/13202_2.png) [@rayner\_tavera](https://forums.maslowcnc.com/u/rayner_tavera)\
**Post date:** [August 11, 2018, 2:49pm UTC](https://forums.maslowcnc.com/t/groundcontrol-closes-unexpectedly-upon-connecting-to-arduino/5636/5 "2018-08-11T14:49:32Z")

</div>

Yes this is the portable GC. Didn’t know there was any other version lol.

Yes, here’s the log:

Connected on port COM6

PCB v1.2 Detected

error: EEPROM read fail. Using default settings.

Sent: $$  
Grbl v1.00

ready

ok

Sent: B05  
[Forward Calculating Position]

Message: Unable to find valid machine position for chain lengths 0.00, 0.00 . Please set the chains to a known length (Actions -\> Set Chain Lengths)

$0=2438.40 (machine width, mm)

$1=1219.19995117 (machine height, mm)

$2=2978.39990234 (motor distance, mm)

$3=463.00000000 (motor height, mm)

$4=310.00000000 (sled width, mm)

$5=139.00000000 (sled height, mm)

$6=79.00000000 (sled cg, mm)

$7=1 (Kinematics Type 1=Quadrilateral, 2=Triangular)

$8=250.00000000 (rotation radius, mm)

$9=2000 (axis idle before detach, ms)

$10=0 (full length of chain, mm)

$11=1650 (calibration chain length, mm)

$12=8113.70019531 (main steps per revolution)

$13=63.50000000 (distance / rotation, mm)

$15=700 (max feed, mm/min)

$16=1 (Auto Z Axis, 1 = Yes)

$17=0 (auto spindle enable 1=servo, 2=relay\_h, 3=relay\_l)

$18=12.60000038 (max z axis RPM)

$19=3.17000007 (z axis distance / rotation)

$20=7560.00000000 (z axis steps per revolution)

$21=1300.00000000 (main Kp Pos)

$22=0.00000000 (main Ki Pos)

$23=34.00000000 (main Kd Pos)

$24=1.00000000 (main Pos proportional weight)

$25=5.00000000 (main Kp Velocity)

$26=0.00000000 (main Ki Velocity)

$27=0.27999999 (main Kd Velocity)

$28=1.00000000 (main Velocity proportional weight)

$29=0.00000000 (z axis Kp Pos)

$30=0.00000000 (z axis Ki Pos)

$31=34.00000000 (z axis Kd Pos)

$32=1.00000000 (z axis Pos proportional weight)

---

<div class="post-metadata">

**Author:** ![Gero](https://yyz1.discourse-cdn.com/flex031/user_avatar/forums.maslowcnc.com/gero/32/17487_2.png) [@Gero](https://forums.maslowcnc.com/u/Gero)\
**Post date:** [August 11, 2018, 3:03pm UTC](https://forums.maslowcnc.com/t/groundcontrol-closes-unexpectedly-upon-connecting-to-arduino/5636/6 "2018-08-11T15:03:25Z")

</div>

To be honest, I’m clueless. Just trying to keep you motivated unit the experts come in 🙂  
It’s just the standard set of questions to rule things out and I might just ask them ahead. Sadly I don’t have access to a win machine right now to try 1.19 with a cleaned setup.  
If you don’t mind a few more things:

- is the arduino connected directly to the usb port or on a hub?
- leave GC closed and start the arduino IDE, click the serial monitor and check if you have a output similar to this (57600 baud):  
 ![image](https://canada1.discourse-cdn.com/flex031/uploads/maslowcnc/original/2X/8/8f6f1ecd6acd44bf8973f341a5c7e6f8426b5ffe.png)
- can you locate a groundcontrol.ini in c:\user\{yourusername}?

---

<div class="post-metadata">

**Author:** ![rayner\_tavera](https://yyz1.discourse-cdn.com/flex031/user_avatar/forums.maslowcnc.com/rayner_tavera/32/13202_2.png) [@rayner\_tavera](https://forums.maslowcnc.com/u/rayner_tavera)\
**Post date:** [August 11, 2018, 3:11pm UTC](https://forums.maslowcnc.com/t/groundcontrol-closes-unexpectedly-upon-connecting-to-arduino/5636/7 "2018-08-11T15:11:46Z")

</div>

Hahaha, thanks for your help, I appreciate you replying to my post quickly 🙂 I went into this as a last resort as I googled quite enough before I decided to post.

The arduino is directly connected to my laptop 🙂 No hubs whatsoever.

It seems its really the chain measurement thingy as even the arduino IDE also says the same thing:

 ![arduino](https://canada1.discourse-cdn.com/flex031/uploads/maslowcnc/original/2X/8/8dd50991eceb2f3ef744bd81d0de66bb35d6b536.jpeg)

Yes, I can find my groundcontrol.ini, this is what it contains:  
[Computed Settings]  
distperrot = 63.5  
kpposmain = 1300  
kiposmain = 0  
kdposmain = 34  
propweightmain = 1  
kpposz = 1300  
kiposz = 0  
kdposz = 34  
distperrotrightchaintolerance = 63.50000  
kpvmain = 5  
kivmain = 0  
kdvmain = 0.28  
kpvz = 5  
kivz = 0  
kdvz = 0.28  
chainoversprocketcomputed = 1  
fpwmcomputed = 3  
kinematicstypecomputed = 1  
distperrotleftchaintolerance = 63.50000

[Maslow Settings]  
bedheight = 1219.2  
openfile =  
motoroffsety = 463  
sledwidth = 310  
zaxissafeheight = 5  
bufferon = 0  
bedwidth = 2438.4  
comport = COM6  
macro1\_title = Macro 1  
sledheight = 139  
macro2 =  
macro1 =  
zaxis = 0  
sledcg = 79  
macro2\_title = Macro 2  
colorscheme = Light  
zdistperrot = 3.17  
motorspacingx = 2978.4

[Advanced Settings]  
rotationradius = 100  
chainextendlength = 1650  
kiv = 0  
gearteeth = 10  
spindleautomate = None  
kdvz = 0.28  
chainsagcorrection = 0  
chainpitch = 6.35  
zencodersteps = 7560.0  
maxfeedrate = 800  
enablepospidvalues = 0  
rightchaintolerance = 0  
enablevpidvalues = 0  
chainlength = 3360  
kpvz = 5  
kdposz = 34  
chainoversprocket = Top  
kpposz = 1300  
fpwm = 490Hz  
kdpos = 34  
encodersteps = 8113.73  
truncate = 0  
homex = 0.0  
homey = 0.0  
kinematicstype = Quadrilateral  
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

Many thanks!

---

<div class="post-metadata">

**Author:** ![Gero](https://yyz1.discourse-cdn.com/flex031/user_avatar/forums.maslowcnc.com/gero/32/17487_2.png) [@Gero](https://forums.maslowcnc.com/u/Gero)\
**Post date:** [August 11, 2018, 3:19pm UTC](https://forums.maslowcnc.com/t/groundcontrol-closes-unexpectedly-upon-connecting-to-arduino/5636/8 "2018-08-11T15:19:27Z")

</div>

The error message is familiar, but should not crash GC and to get rid of it, GC needs to run.  
2 things I would give a try if I was in your position, without knowing if it helps and I might be totally off:

- try if GC 1.18 does the same thing (bugs do sneak in sometimes)
- fill ‘openfile =’ with a valid path to a .nc file (there was an old bug as far as I remember)

---

<div class="post-metadata">

**Author:** ![rayner\_tavera](https://yyz1.discourse-cdn.com/flex031/user_avatar/forums.maslowcnc.com/rayner_tavera/32/13202_2.png) [@rayner\_tavera](https://forums.maslowcnc.com/u/rayner_tavera)\
**Post date:** [August 11, 2018, 3:37pm UTC](https://forums.maslowcnc.com/t/groundcontrol-closes-unexpectedly-upon-connecting-to-arduino/5636/9 "2018-08-11T15:37:44Z")

</div>

Solved. Buggy 1.19 version right there 🙂 doesn’t close now with 1.18. Using windows 8 64 bit for reference.

I still get the chains error btw, why is that?

 ![chains](https://canada1.discourse-cdn.com/flex031/uploads/maslowcnc/original/2X/4/4992b01aff913eb3b92eec2e4d0ff450f225bb29.jpeg)

---

<div class="post-metadata">

**Author:** ![Gero](https://yyz1.discourse-cdn.com/flex031/user_avatar/forums.maslowcnc.com/gero/32/17487_2.png) [@Gero](https://forums.maslowcnc.com/u/Gero)\
**Post date:** [August 11, 2018, 3:40pm UTC](https://forums.maslowcnc.com/t/groundcontrol-closes-unexpectedly-upon-connecting-to-arduino/5636/10 "2018-08-11T15:40:12Z")

</div>

Congratulations on finding a bug! You may now open an issue on github so it is solved in the next release! 😂  
For the error message click continue and do the calibration (or did you do that before?).

---

<div class="post-metadata">

**Author:** ![rayner\_tavera](https://yyz1.discourse-cdn.com/flex031/user_avatar/forums.maslowcnc.com/rayner_tavera/32/13202_2.png) [@rayner\_tavera](https://forums.maslowcnc.com/u/rayner_tavera)\
**Post date:** [August 11, 2018, 3:41pm UTC](https://forums.maslowcnc.com/t/groundcontrol-closes-unexpectedly-upon-connecting-to-arduino/5636/11 "2018-08-11T15:41:19Z")

</div>

Hahahaha thanks!

I didn’t yet. Have yet to mount my motors, arduino and sled to the frame 🙂

Extremely appreciate your help and patience Gero! 😃

---

<div class="post-metadata">

**Author:** ![blurfl](https://yyz1.discourse-cdn.com/flex031/user_avatar/forums.maslowcnc.com/blurfl/32/9_2.png) [@blurfl](https://forums.maslowcnc.com/u/blurfl)\
**Post date:** [August 11, 2018, 3:48pm UTC](https://forums.maslowcnc.com/t/groundcontrol-closes-unexpectedly-upon-connecting-to-arduino/5636/12 "2018-08-11T15:48:40Z")

</div>

> [@rayner\_tavera](#):
>
> I still get the chains error btw, why is that?

> [@rayner\_tavera](#):
>
> Have yet to mount my motors … to the frame 🙂

The Arduino does it’s work by moving the chains and keeping track of where they are. The error will go away when you’ve been through the chain calibration step. Until then you can ignore that alert 😁

---

<div class="post-metadata">

**Author:** ![MdO](https://avatars.discourse-cdn.com/v4/letter/m/f17d59/32.png) [@MdO](https://forums.maslowcnc.com/u/MdO)\
**Post date:** [August 13, 2018, 8:07pm UTC](https://forums.maslowcnc.com/t/groundcontrol-closes-unexpectedly-upon-connecting-to-arduino/5636/13 "2018-08-13T20:07:52Z")

</div>

@rayner_tavera:  
Did you open an issue on GitHub yet? I encountered exactly the same issue. Version 1.18 solved it (after 1,5 hours of testing and searching the forum).

---

<div class="post-metadata">

**Author:** ![bar](https://yyz1.discourse-cdn.com/flex031/user_avatar/forums.maslowcnc.com/bar/32/10_2.png) [@bar](https://forums.maslowcnc.com/u/bar)\
**Post date:** [August 13, 2018, 8:18pm UTC](https://forums.maslowcnc.com/t/groundcontrol-closes-unexpectedly-upon-connecting-to-arduino/5636/14 "2018-08-13T20:18:58Z")

</div>

Yes, there is an issue open for it here:

> <https://github.com/MaslowCNC/GroundControl/issues/750>

And I’ve created a pull request to fix the issue. Sorry!
