# Calibration - "Failed to execute script main"

**URL:** <https://forums.maslowcnc.com/t/calibration-failed-to-execute-script-main/2448>\
**Category:** Troubleshooting\
**Created:** [February 21, 2018, 3:02am UTC](https://forums.maslowcnc.com/t/calibration-failed-to-execute-script-main/2448 "2018-02-21T03:02:11Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![arnoldcp](https://avatars.discourse-cdn.com/v4/letter/a/ecb155/32.png) [@arnoldcp](https://forums.maslowcnc.com/u/arnoldcp)\
**Post date:** [February 21, 2018, 3:02am UTC](https://forums.maslowcnc.com/t/calibration-failed-to-execute-script-main/2448/1 "2018-02-21T03:02:11Z")

</div>

Trying to do the final bit of my calibration on the triangular linkage. I have taken my measurements and input them and I click Enter Values and GC crashes and provides the message “Failed to execute script main”.

Any ideas?

So I actually went back to GC 1.04 and attempted it to run the final test pattern calibration and it gave me an error message and just said it couldn’t calibrate and to check my machine dimensions.

Windows 10  
1.6 FW / 1.06 GC  
Final Frame, Non-Standard  
Z axis motor  
Triangular Mount

---

<div class="post-metadata">

**Author:** ![rjon17469](https://avatars.discourse-cdn.com/v4/letter/r/5f8ce5/32.png) [@rjon17469](https://forums.maslowcnc.com/u/rjon17469)\
**Post date:** [February 21, 2018, 4:01am UTC](https://forums.maslowcnc.com/t/calibration-failed-to-execute-script-main/2448/2 "2018-02-21T04:01:11Z")

</div>

Do you happen to have your groundcontrol.ini and/or log files available?

The second error message, the one about not being able to calibrate and to check the machine dimensions, occurs when the iterative calibration routine exits without being able to determine machine parameters. Significantly off initial values could contribute to this, but either of the above files would confirm or deny that is happening here. Do you happen to remember the measurements you entered in?

The failed to execute script main is a different one that I haven’t seen before though.

---

<div class="post-metadata">

**Author:** ![Bee](https://yyz1.discourse-cdn.com/flex031/user_avatar/forums.maslowcnc.com/bee/32/2160_2.png) [@Bee](https://forums.maslowcnc.com/u/Bee)\
**Post date:** [February 21, 2018, 6:17am UTC](https://forums.maslowcnc.com/t/calibration-failed-to-execute-script-main/2448/3 "2018-02-21T06:17:54Z")

</div>

What OS? What is the make and model of your PC please?

Thank you

---

<div class="post-metadata">

**Author:** ![arnoldcp](https://avatars.discourse-cdn.com/v4/letter/a/ecb155/32.png) [@arnoldcp](https://forums.maslowcnc.com/u/arnoldcp)\
**Post date:** [February 21, 2018, 4:32pm UTC](https://forums.maslowcnc.com/t/calibration-failed-to-execute-script-main/2448/4 "2018-02-21T16:32:18Z")

</div>

Windows 10  
My PC is a little Foxconn NT-A3500, AMD E-350 processor.

I am at work but I can post the log file later tonight. I assume it is something with the “initial guesses” that I had in the system. Oddly though, I have calibrated this before and it worked fine. I simply moved is location in my garage.

This is probably an asked and answered question but I see the following dimensions in the settings here is what I understand about these dimensions;

**Distance Between Motors** - Calibrated Value  
**Motor Offset** - Input Initial Guess but Ends up as a Calibrated Value  
**Distance Between Mounting Points** - N/A for Triangular Kinematics  
**Vertical Distance Sled Mounts to Cutter** - I THINK this is from the chain connection points of the linkage kits to the cutter.  
**CoG** - N/A for Triangular Kinematics  
**Chain Length** - This is a new one for me, is this just the overall length of chain the machine has, my frame is marginally larger than the stock frame so perhaps this is part of my issue?  
**Rotation Radius for Triangular Kinematics** - for Logan’s kit I think this is 4.5"  
**Chain Sag Correction Value** - Calibrated Value

Also, the message I get is in the Command Prompt window that runs in parallel with GC. The main GC window will disappear and that message appears as the last line prior to the Command Prompt windows closes out.

---

<div class="post-metadata">

**Author:** ![Bee](https://yyz1.discourse-cdn.com/flex031/user_avatar/forums.maslowcnc.com/bee/32/2160_2.png) [@Bee](https://forums.maslowcnc.com/u/Bee)\
**Post date:** [February 21, 2018, 5:18pm UTC](https://forums.maslowcnc.com/t/calibration-failed-to-execute-script-main/2448/5 "2018-02-21T17:18:37Z")

</div>

Is this using the Windows portable version of the software or running from source? How much memory do you have installed?

Thank you

---

<div class="post-metadata">

**Author:** ![arnoldcp](https://avatars.discourse-cdn.com/v4/letter/a/ecb155/32.png) [@arnoldcp](https://forums.maslowcnc.com/u/arnoldcp)\
**Post date:** [February 21, 2018, 5:19pm UTC](https://forums.maslowcnc.com/t/calibration-failed-to-execute-script-main/2448/6 "2018-02-21T17:19:11Z")

</div>

Running the portable version, and I have 8GB installed.

---

<div class="post-metadata">

**Author:** ![Bee](https://yyz1.discourse-cdn.com/flex031/user_avatar/forums.maslowcnc.com/bee/32/2160_2.png) [@Bee](https://forums.maslowcnc.com/u/Bee)\
**Post date:** [February 21, 2018, 5:25pm UTC](https://forums.maslowcnc.com/t/calibration-failed-to-execute-script-main/2448/7 "2018-02-21T17:25:02Z")

</div>

How much memory is allocated to the video ? Have you attempted updating the video drivers?

Thank you

---

<div class="post-metadata">

**Author:** ![rjon17469](https://avatars.discourse-cdn.com/v4/letter/r/5f8ce5/32.png) [@rjon17469](https://forums.maslowcnc.com/u/rjon17469)\
**Post date:** [February 21, 2018, 5:28pm UTC](https://forums.maslowcnc.com/t/calibration-failed-to-execute-script-main/2448/8 "2018-02-21T17:28:38Z")

</div>

> [@arnoldcp](#):
>
> Distance Between Motors - Calibrated Value
> 
> Motor Offset - Input Initial Guess but Ends up as a Calibrated Value
> 
> Distance Between Mounting Points - N/A for Triangular Kinematics
> 
> Vertical Distance Sled Mounts to Cutter - I THINK this is from the chain connection points of the linkage kits to the cutter.
> 
> CoG - N/A for Triangular Kinematics
> 
> Chain Length - This is a new one for me, is this just the overall length of chain the machine has, my frame is marginally larger than the stock frame so perhaps this is part of my issue?
> 
> Rotation Radius for Triangular Kinematics - for Logan’s kit I think this is 4.5"
> 
> Chain Sag Correction Value - Calibrated Value

The only critical values you need to worry about during calibration, when using triangular kinematics, are:

Distance between motors  
Motor offset  
Rotation radius  
Chain sag correction

In the current calibration routine, the distance between motors is determined using the chain, then an initial motor offset is estimated based on the step where the chain hangs down to the top of the work area. During the triangular calibration process where the cuts are made, the final motor offset, rotation radius, and chain sag correction value are determined.

My first guess, if you’re getting the error that it cannot calibrate, would be that for some reason it’s thinking you need a negative chain sag correction value, which is not allowed. But seeing your .ini file and/or logs, along with the measurements you entered, would confirm that.

---

<div class="post-metadata">

**Author:** ![Bee](https://yyz1.discourse-cdn.com/flex031/user_avatar/forums.maslowcnc.com/bee/32/2160_2.png) [@Bee](https://forums.maslowcnc.com/u/Bee)\
**Post date:** [February 21, 2018, 5:34pm UTC](https://forums.maslowcnc.com/t/calibration-failed-to-execute-script-main/2448/9 "2018-02-21T17:34:54Z")

</div>

So far my thoughts are not panning out on this one. It just seems to be belching on something. The error is non descript - I think it’s returned because of an unclean exit similar to a heap overflow. I was thinking if it had a low memory pool it could be it is running out. But a negative number in the wrong place could explain it.

Thank you

---

<div class="post-metadata">

**Author:** ![arnoldcp](https://avatars.discourse-cdn.com/v4/letter/a/ecb155/32.png) [@arnoldcp](https://forums.maslowcnc.com/u/arnoldcp)\
**Post date:** [February 21, 2018, 5:37pm UTC](https://forums.maslowcnc.com/t/calibration-failed-to-execute-script-main/2448/10 "2018-02-21T17:37:27Z")

</div>

So this has an interesting problem with this computer the video drivers are no longer supported by AMD directly and MSFT pushes them. I have the latest updates for the drivers from MSFT.

I misstated before I have 4GB of RAM of which 256MB is allocated to the video card.

My chain sag correction value had originally been set to 19.58…something. I left it when I recalibrated.

---

<div class="post-metadata">

**Author:** ![arnoldcp](https://avatars.discourse-cdn.com/v4/letter/a/ecb155/32.png) [@arnoldcp](https://forums.maslowcnc.com/u/arnoldcp)\
**Post date:** [February 21, 2018, 5:39pm UTC](https://forums.maslowcnc.com/t/calibration-failed-to-execute-script-main/2448/11 "2018-02-21T17:39:09Z")

</div>

[groundcontrol.OLD](https://canada1.discourse-cdn.com/flex031/uploads/maslowcnc/original/2X/7/74c32d0fa8c95571f6c84c5a034413a685c1b49c.OLD) (1.2 KB)

ini file attached. I actually started the whole process from scratch again which is why this is named .OLD

---

<div class="post-metadata">

**Author:** ![Bee](https://yyz1.discourse-cdn.com/flex031/user_avatar/forums.maslowcnc.com/bee/32/2160_2.png) [@Bee](https://forums.maslowcnc.com/u/Bee)\
**Post date:** [February 21, 2018, 5:43pm UTC](https://forums.maslowcnc.com/t/calibration-failed-to-execute-script-main/2448/12 "2018-02-21T17:43:47Z")

</div>

> [@arnoldcp](#):
>
> So this has an interesting problem with this computer the video drivers are no longer supported by AMD directly and MSFT pushes them. I have the latest updates for the drivers from MSFT.

I have a PC that was forced a Windows 10 update with a video card that is not supported past windows 8 by intel. So I feel ya.

I wonder if a value is getting inverted during calibration.

Thank you

---

<div class="post-metadata">

**Author:** ![arnoldcp](https://avatars.discourse-cdn.com/v4/letter/a/ecb155/32.png) [@arnoldcp](https://forums.maslowcnc.com/u/arnoldcp)\
**Post date:** [February 21, 2018, 6:36pm UTC](https://forums.maslowcnc.com/t/calibration-failed-to-execute-script-main/2448/13 "2018-02-21T18:36:57Z")

</div>

Alright, just started from a blank ini file. Still having the same behavior. In 1.06 it crashes out, in 1.04 it simply tells me I need to check my dimensions.

Attached is the log file and the below are my test cut dimensions:

1 to 2 = 1929 mm  
3 to 4 = 1938 mm  
5 to Top = 229 mm

Very strange.

[log.txt](https://canada1.discourse-cdn.com/flex031/uploads/maslowcnc/original/2X/5/5603425cb27e338d6330340930ad52a1289d33d5.txt) (687.5 KB)

---

<div class="post-metadata">

**Author:** ![Bee](https://yyz1.discourse-cdn.com/flex031/user_avatar/forums.maslowcnc.com/bee/32/2160_2.png) [@Bee](https://forums.maslowcnc.com/u/Bee)\
**Post date:** [February 21, 2018, 6:42pm UTC](https://forums.maslowcnc.com/t/calibration-failed-to-execute-script-main/2448/14 "2018-02-21T18:42:54Z")

</div>

Do you have another PC?

I’m wondering if this is box specific.

Thank you

---

<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:** [February 21, 2018, 7:01pm UTC](https://forums.maslowcnc.com/t/calibration-failed-to-execute-script-main/2448/15 "2018-02-21T19:01:01Z")

</div>

Hmm, the groundcontrol.old file is really helpful because this sounds to me like an issue where one of the settings weren’t adding up (for example if it thought the motors were 100 feet apart or something similar)…unfortunately from looking at the file everything looks normal.

Here are the contents of that file for reference:

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

[Maslow Settings]
bedheight = 1219.2
openfile = C:\Users\colin\Desktop\Sled No Drill Contour.nc
motoroffsety = 526.1
sledwidth = 434
bedwidth = 2438.4
comport = COM3
macro1_title = Macro 1
sledheight = 110
macro2 = 
macro1 = 
zaxis = 1
sledcg = 79
macro2_title = Macro 2
colorscheme = Light
zdistperrot = 3.17
motorspacingx = 3013.67

[Advanced Settings]
rotationradius = 267.5
zencodersteps = 7560.0
kiv = 0
gearteeth = 10
chainsagcorrection = 
chainpitch = 6.35
enablepospidvalues = 0
enablevpidvalues = 0
chainlength = 4000
zaxisauto = 0
chainoversprocket = Top
fpwm = 490Hz
kdpos = 0
encodersteps = 8113.73
truncate = 0
homex = 0.0
homey = 0.0
kinematicstype = Triangular
kipos = 0
kdv = 0
digits = 4
kppos = 1100
kpv = 52
propweight = 1

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

---

<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:** [February 21, 2018, 7:02pm UTC](https://forums.maslowcnc.com/t/calibration-failed-to-execute-script-main/2448/16 "2018-02-21T19:02:40Z")

</div>

> [@bar](#):
>
> chainsagcorrection =

The only thing which seems strange to me is that chain sag correction does not have a value. I would expect it to default to 0

---

<div class="post-metadata">

**Author:** ![arnoldcp](https://avatars.discourse-cdn.com/v4/letter/a/ecb155/32.png) [@arnoldcp](https://forums.maslowcnc.com/u/arnoldcp)\
**Post date:** [February 21, 2018, 7:04pm UTC](https://forums.maslowcnc.com/t/calibration-failed-to-execute-script-main/2448/17 "2018-02-21T19:04:42Z")

</div>

hmmm that is a good catch because the Chain Sag Correction had been 19.38…something and I thought it might be causing the issue and I reset it to 0 in GC.

---

<div class="post-metadata">

**Author:** ![arnoldcp](https://avatars.discourse-cdn.com/v4/letter/a/ecb155/32.png) [@arnoldcp](https://forums.maslowcnc.com/u/arnoldcp)\
**Post date:** [February 21, 2018, 7:13pm UTC](https://forums.maslowcnc.com/t/calibration-failed-to-execute-script-main/2448/18 "2018-02-21T19:13:03Z")

</div>

Just tried it on my laptop, fails in the same way so it doesn’t seem to be box specific.

---

<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:** [February 21, 2018, 7:18pm UTC](https://forums.maslowcnc.com/t/calibration-failed-to-execute-script-main/2448/19 "2018-02-21T19:18:11Z")

</div>

Do you think you can get a screenshot of the error message? (or is it doing the thing where it closes too quickly to see it?)

---

<div class="post-metadata">

**Author:** ![arnoldcp](https://avatars.discourse-cdn.com/v4/letter/a/ecb155/32.png) [@arnoldcp](https://forums.maslowcnc.com/u/arnoldcp)\
**Post date:** [February 21, 2018, 7:19pm UTC](https://forums.maslowcnc.com/t/calibration-failed-to-execute-script-main/2448/20 "2018-02-21T19:19:16Z")

</div>

It is so quick that I doubt that I can get one. I had to repeat it a few times before I knew exactly where to look on the screen so I could read it.

[Next page](https://forums.maslowcnc.com/t/calibration-failed-to-execute-script-main/2448.md?page=2)
