Solved: Stuck on Z-axis calibration step during initial setup

I just assembled my Bars Bolt Together Frame and built the temporary sled. Then I began to go through calibration in Ground Control v1.17 on my MacBook, up until the Z-axis calibration. When I get there and enable the automatic Z-axis and click calibrate, I get a popup that has what appear to be Z axis controls. There is a button called Raise under the Relative group. I clicked that, assuming it would raise the router bit. Instead, it lowered the sled. I clicked Lower and again it lowered the sled. I clicked close and skip and then Finish to save the settings. When I hit home, or try to move the sled using the buttons, I get a popup that says, “Unable to find valid machine position for chain lengths 1657.12, 1657.05 . Please set the chains to a known length (Actions -> Set Chain Lengths)” then it said “ALARM: The sled is not keeping up with its expected position and has halted. Click the ‘Stop’ button to clear the alarm. More information at: https://github.com/MaslowCNC/Firmware/wiki/Keeping-Up
[Forward Calculating Position]” I had some other things I needed to do, so I powered everything off and closed the software.

Later, I powered it all back up and re-opened Ground Control and went through the calibration again, but this time instead of moving the sled, it threw the error above immediately. I can’t find this exact issue in the forums, so I am creating a new post. I apologize if I missed it and created a dupe. I put a marker line at the end of the log, restarted the software, and tried the Z-axis calibration. The logs are below. There were a lot of repeated lines, so if you see … it was just the same line as above repeated many times. Please let me know how I can proceed, I’m very excited to see it cut out the real sled so I can ditch the temp one and get busy making things!

Logs

Connected on port /dev/tty.usbmodem14511
PCB v1.2 Detected
Grbl v1.00
ready
ok
Sent: G20
[Forward Calculating Position]
<Idle,MPos:0.00,0.00,0.09,WPos:0.000,0.000,0.000>
[PE:0.00,0.00,121]
Message: Unable to find valid machine position for chain lengths 1657.09, 1657.03 . Please set the chains to a known length (Actions -> Set Chain Lengths)
G20
ok
Sent: $$
<Idle,MPos:0.00,0.00,0.00,WPos:0.000,0.000,0.000>
[PE:0.00,0.00,127]
$0=2438.40 (machine width, mm)
$1=1219.19995117 (machine height, mm)
$2=5967.59033203 (motor distance, mm)
$3=420.00000000 (motor height, mm)
$4=310.00000000 (sled width, mm)
$5=139.00000000 (sled height, mm)
$6=79.00000000 (sled cg, mm)
$7=2 (Kinematics Type 1=Quadrilateral, 2=Triangular)
$8=140.00000000 (rotation radius, mm)
$9=2000 (axis idle before detach, ms)
$10=3360 (full length of chain, mm)
$11=1650 (calibration chain length, mm)
$12=8113.73046875 (main steps per revolution)
$13=63.50000000 (distance / rotation, mm)
$15=800 (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=1300.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)
$33=5.00000000 (z axis Kp Velocity)
$34=0.00000000 (z axis Ki Velocity)
$35=0.27999999 (z axis Kd Velocity)
$36=1.00000000 (z axis Velocity proportional weight)
$37=0.00000000 (chain sag correction value)
$38=2 (chain over sprocket)
$39=3 (PWM frequency value 1=39,000Hz, 2=4,100Hz, 3=490Hz)
$40=63.50000000 (distance / rotation, including chain tolerance, left chain, mm)
$41=63.50000000 (distance / rotation, including chain tolerance, right chain, mm)
$42=2.00000000 (position error alarm limit, mm)
ok
Sent: B05
<Idle,MPos:0.00,0.00,0.00,WPos:0.000,0.000,0.000>
[PE:0.00,0.00,127]
B05
Firmware Version 1.17
ok
Ground Control Version 1.17
Sent: G20
G20
ok
<Idle,MPos:0.00,0.00,0.00,WPos:0.000,0.000,0.000>
[PE:0.00,0.00,127]

<Idle,MPos:0.00,0.00,0.00,WPos:0.000,0.000,0.000>
[PE:0.00,0.00,127]
Sent: ~
ok
<Idle,MPos:0.00,0.00,0.00,WPos:0.000,0.000,0.000>
[PE:0.00,0.00,127]

<Idle,MPos:0.00,0.00,0.00,WPos:0.000,0.000,0.000>
[PE:0.00,0.00,127]
Sent: $38=1
[Forward Calculating Position]
<Idle,MPos:0.00,0.00,0.00,WPos:0.000,0.000,0.000>
[PE:0.00,0.00,127]
<Idle,MPos:0.00,0.00,0.00,WPos:0.000,0.000,0.000>
[PE:0.00,0.00,127]
Message: Unable to find valid machine position for chain lengths 1657.09, 1657.03 . Please set the chains to a known length (Actions -> Set Chain Lengths)
ok
Sent: $42=2000
ok
Sent: $38=2
[Forward Calculating Position]
<Idle,MPos:0.00,0.00,0.00,WPos:0.000,0.000,0.000>
[PE:0.00,0.00,127]
<Idle,MPos:0.00,0.00,0.00,WPos:0.000,0.000,0.000>
[PE:0.00,0.00,127]
Message: Unable to find valid machine position for chain lengths 1657.09, 1657.03 . Please set the chains to a known length (Actions -> Set Chain Lengths)
ok
Sent: $$
$0=2438.40 (machine width, mm)
$1=1219.19995117 (machine height, mm)
$2=5967.59033203 (motor distance, mm)
$3=420.00000000 (motor height, mm)
$4=310.00000000 (sled width, mm)
$5=139.00000000 (sled height, mm)
$6=79.00000000 (sled cg, mm)
$7=2 (Kinematics Type 1=Quadrilateral, 2=Triangular)
$8=140.00000000 (rotation radius, mm)
$9=2000 (axis idle before detach, ms)
$10=3360 (full length of chain, mm)
$11=1650 (calibration chain length, mm)
$12=8113.73046875 (main steps per revolution)
$13=63.50000000 (distance / rotation, mm)
$15=800 (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=1300.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)
$33=5.00000000 (z axis Kp Velocity)
$34=0.00000000 (z axis Ki Velocity)
$35=0.27999999 (z axis Kd Velocity)
$36=1.00000000 (z axis Velocity proportional weight)
$37=0.00000000 (chain sag correction value)
$38=2 (chain over sprocket)
$39=3 (PWM frequency value 1=39,000Hz, 2=4,100Hz, 3=490Hz)
$40=63.50000000 (distance / rotation, including chain tolerance, left chain, mm)
$41=63.50000000 (distance / rotation, including chain tolerance, right chain, mm)
$42=2000.00000000 (position error alarm limit, mm)
ok
<Idle,MPos:0.00,0.00,0.00,WPos:0.000,0.000,0.000>
Sent: $42=2.0
[PE:0.00,0.00,127]
ok
<Idle,MPos:0.00,0.00,0.00,WPos:0.000,0.000,0.000>
[PE:0.00,0.00,127]

<Idle,MPos:0.00,0.00,0.00,WPos:0.000,0.000,0.000>
[PE:0.00,0.00,127]
Sent: $16=1
ok
<Idle,MPos:0.00,0.00,0.00,WPos:0.000,0.000,0.000>
[PE:0.00,0.00,127]

<Idle,MPos:0.00,0.00,0.00,WPos:0.000,0.000,0.000>
[PE:0.00,0.00,127]
Sent: G20
G20
ok
Sent: G91 G00 Z0.100 G90
G91
G00 Z0.100
<Idle,MPos:0.00,0.00,0.00,WPos:0.000,0.000,0.000>
[PE:-1387.63,-1387.71,127]
ALARM: The sled is not keeping up with its expected position and has halted. Click the ‘Stop’ button to clear the alarm. More information at: https://github.com/MaslowCNC/Firmware/wiki/Keeping-Up
G90
[Forward Calculating Position]
<Idle,MPos:0.00,0.00,0.00,WPos:0.000,0.000,0.000>
[PE:-0.04,-0.02,127]
<Idle,MPos:0.00,0.00,0.00,WPos:0.000,0.000,0.000>
[PE:0.00,-0.02,127]
Message: Unable to find valid machine position for chain lengths 1657.67, 1657.57 . Please set the chains to a known length (Actions -> Set Chain Lengths)
<Idle,MPos:0.00,0.00,0.00,WPos:0.000,0.000,0.000>
[PE:0.00,0.02,127]

<Idle,MPos:0.00,0.00,0.00,WPos:0.000,0.000,0.000>
[PE:0.00,0.00,127]
<Idle,MPos:0.00,0.00,0.00,WPos:0.000,0.000,0.000>
Sent: ~
[PE:0.00,0.00,127]
ok
<Idle,MPos:0.00,0.00,0.00,WPos:0.000,0.000,0.000>
[PE:0.00,0.00,127]

[PE:0.00,0.00,127]
<Idle,MPos:0.00,0.00,0.00,WPos:0.000,0.000,0.000>
Message: Notice: Exiting the calibration process early may result in incorrect calibration.[PE:0.00,0.00,127]
<Idle,MPos:0.00,0.00,0.00,WPos:0.000,0.000,0.000>
[PE:0.00,0.00,127]
<Idle,MPos:0.00,0.00,0.00,WPos:0.000,0.000,0.000>
[PE:0.00,0.00,127]
<Idle,MPos:0.00,0.00,0.00,WPos:0.000,0.000,0.000>
[PE:0.00,0.00,127]
<Idle,MPos:0.00,0.00,0.00,WPos:0.000,0.000,0.000>
[PE:0.00,0.00,127]
<Idle,MPos:0.00,0.00,0.00,WPos:0.000,0.000,0.000>
[PE:0.00,0.00,127]
<Idle,MPos:0.00,0.00,0.00,WPos:0.000,0.000,0.000>
[PE:0.00,0.00,127]
Sent: ~
ok
<Idle,MPos:0.00,0.00,0.00,WPos:0.000,0.000,0.000>
[PE:0.00,0.00,127]

<Idle,MPos:0.00,0.00,0.00,WPos:0.000,0.000,0.000>
[PE:0.00,0.00,127]
<Idle,MPos:0.00,0.00,0.00,WPos:0.000,0.000,0.000>

I’ve gone through calibrations several more times. I skipped Z axis and then configured it manually, but every time I adjusted the Z axis, it sent a Y-100 so after a few times, it was on the floor and I was out of chain. I had to take the chain off the sprockets to finish Z-axis calibration. Then I needed to recalibrate the chain position, so I went through calibration and skipped Z-axis. I made it to the cut test pattern and it started the pattern in the middle of the X axis, just above the middle of the Y axis… and I had to hit stop when it went off the edge of the plywood. So I’m still stuck in calibration hell.

In the future, it might be nice to have a screen to set boundaries before the test cut. So, one could move the sled to the top left, bottom left, top right, then bottom right and that would set a rectangle that the sled will not exit.

What is your hand measured motor distance? 6m seems way to high.
$2=5967.59033203 (motor distance, mm)
Could you try to change that in the GC settings and see if that makes a difference?

4 Likes

Manual measurement shows 118.5 inches from center of sprocket to center of sprocket on opposite motor. So it should be 3009.9mm… I changed it and it’s behaving a lot more like I expect now. Just a few more hurdles and I think I’ll be ready to cut the real sled. Thanks for your help! I’ll update this as I know more.

4 Likes

Thanks Gero, that got me past that hurdle. Now I’m trying to cut the final sled and it gets to the point where it is about to cut the center hole and it loses USB connection. I have to remove the sled, redo calibration, and start all over. After 3 chain jumps and 3 frame modifications to attempt to prevent it, I’m not jumping the sprocket anymore, but now I’m hitting a software issue. Is there a way to increase the timeout for communication with the arduino?

2 Likes

There are a number of reasons for communications errors. One is if your USB cable is too close to another cable, particularly the power cable. Another is a bad USB cable.

More possibilities here.

1 Like

If you are loosing the USB connection, increasing the timeout won’t help.

you are either getting a loose connection, or your USB cable is picking up too
much noise

a shorter USB cable, one with ferrites on it, one with more shielding, or one
that you run through a conductive (and grounded) pipe will help.

This is a problem that will only be worse as you try to do more, fix it, don’t
try to paper over it.

David Lang

So I tried moving the cable away from the power cord and went through the calibration and parked it at home. I came back after dinner and started the sled cut from the beginning. It went through and started the second cut on the large circle… and usb timeout again. I realized Arduino IDE was running in the background and when I pulled it up, it had connected to the port, so I thought maybe that was the problem, that it was hijacking the port occasionally. I closed the Arduino IDE and turned everything back off and on again. I restarted Maslow and disconnected the chains and started to do the calibration again. It wouldn’t rotate the motors to align the sprocket to 12:00 position. I closed calibration and clicked the test motors/encoders button. All motors failed to move in both directions. I have restarted and tried everything I can think of (including pulling the latest version of the firmware and GroundControl apps and flashing the firmware with the Arduino IDE.) So now I can connect and upload the ino file, and GroundControl can connect and sees the new firmware version, but still can’t turn the motors… any ideas? I’m get very discouraged. I’ve been trying to cut that sled for days now.

1 Like

Take heart, you’re close. If the serial connection is stable, but none of the motors turn, check that the power cable for the motors is plugged into the Maslow board and not the Arduino. The green LED near the power jack on the Maslow board should be on. Some have found that the power cord of the Maslow power supply came loose from the power brick, check that the blue LED on the power brick is on.

I’ve just been throug the calibration process in search of troublesome places.
What i’ve noticed is that when you power on for the first time you need to set a serial port. you can do that in both ‘actions’ and ‘settings’.
if you do it in ‘actions’ you need to press connect after you have set the port, othervise it’s not open.
if you set it in ‘actions’ and then go to ‘settings’ the port definition is gone, so from your description it could be the connection part missing.
If you select the port in the action menu and then go back to the main window, what does the program write in the console?

Ok, so the problem turned out to be the Z-axis cable. The weight of the cable was pulling the Maslow board away from the Arduino ever so slightly, and for some reason (maybe it was jostling the USB cable when it came loose?) that was causing the usb to lose connection. Anyway, when I go behind the frame to check things, I lift the Z-axis cable to make sure I don’t step on it and pull it loose. When I was doing this, it was reseating it enough I didn’t notice the board was loose. The last time, I didn’t go back there, I just upgraded software, so it didn’t get reseated, so I couldn’t control the motors, because it couldn’t communicate with the motor controller.

I reseated it and made adjustments to the frame to support the Z-axis cable, and the USB cable, and secured the Maslow board to the Arduino. Now I am able to cut the sled. Thanks to everyone who helped me get started!

5 Likes

…and thank you, @Walt_Moorhouse, for reporting the cause of the problem. The more feedback we have on the problems people are having and the causes of those problems, the better we can refine our documentation and design.

3 Likes

I’m having the same problem where I’m in the calibration section and I come to the z-axis calibration and instead of moving the z-axis it moves the left motor. I wanted to make certain that I have everything set up correctly so I went to the Test motors / Encoders section and when I run the test both motors and the z-axis move as they should. I thought it might be a calibration thing so I went to the home screen on GC and tried to manually calibrate the z axis from there and it moves the left motor not the z-axis. It gives me an unknown chain position error after it happens. I tested all the connections between the motor shield and the arduino, they all seem to be working. I also testing the wires and moved them away from the power wires. I’ve tried to restart the board, the motor controller, GC and just about everything else.

Any Ideas from the group?

Thanks for your help, 1st post woot woot.

1 Like

Welcome @K3IH1!
It’s a puzzler, for sure. You’ve verified that the z cable is in socket MP2 and that during the motor test the sled moves during the first two tests, left first then right, and the z axis runs last. When GC starts up, just after it connects it shows which board version it thinks it sees. For a recent kit, that would be:
“PCB v1.2 detected”.
You didn’t mention which version of GC and firmware you’re using (most recent preferred) but unless the two versions are very different that shouldn’t cause what you’re seeing.

Thanks for the quick reply!

I have confirmed that the z-axis is connected to the MP2 port on the motor controller board and the left and right motors are connected to 1 and 3. The test moves the left motor (facing the Maslow) then the right, then the z-axis without any issues.

I took a screen shot of the startup on GC. I’m running GC on a Mac currently.

image

Would you consider installing the current release of GC and the firmware? The Mac .dmg has both GroundControl and the firmware. Not certain it will fix the problem, but if you have time to try…

Or, for a different (sledgehammer) approach, try Actions/Advanced/WipeEEPROM followed by Actions/Advanced/ResetSettingsToDefaults. This will clear the Arduino stored settings, replace GC’s ini file with the defaults and quit GC. When you start GC again, you will need to select the port again, as that setting is eliminated as well.

1 Like

16%20AM

I’ve updated the firmware and GC to the latest versions. After, I wiped the EEPROM and Reset to defaults. I tried the test encoders again and it worked just as before. I then went to the z axis on the GC home screen and tried to raise and lower the z axis and it lifted the left motor and gave me an error the the sled is not keeping up, same as before.

Maybe there will be a clue in the log file…
There is a log named ‘log.txt’. The location depends on the operating system:
Linux: in the GroundControl folder that you run from
Windows: in the ‘GroundControl-Windows.Portable.v1.xx\GroundControl\’ folder
OSX: in Finder, in the Applications folder, find the groundcontrol app, right-click on it and ‘Show Package Contents’ to open a window that lets you navigate to the right place. The log.txt file is in the ‘Contents/Resources/yourapp/’ folder.

Could you post a zipped copy of that file?

It sounds to me like the left motor might not be where it wants to be. Moving the z-axis will power up all three motors so if the left motor thinks it is not in the right spot it will start to move.

I would give the Set Chain Length Automatic process a go to make sure the motors are in known places

2 Likes