StepOKO Homing problem. Z-axis moves down and stops (SOLVED)

Assembly questions and answers for the Shapeoko 3 CNC Mill
Post Reply
mrTheWheel
Posts: 5
Joined: Mon Jul 25, 2016 11:05 pm

StepOKO Homing problem. Z-axis moves down and stops (SOLVED)

Post by mrTheWheel » Thu Aug 11, 2016 2:45 pm

Hi all,
Not sure this is the right place to post this but I don't know where else.

I installed three limit switches on my SO3 (Sparkfun Delux) with the Stepoko controller (Grbl 0.9j).
I'm using Carbide Motion 3.0.361

The switches work as limit-switches but I have not been able to perform a correct Homing sequence.

I changed $22=1 (which also changed $21 to 1).

I have done several milling jobs and they all went OK. So there are no issues with noise (the Stepoko has RC circuitry for the switches) and all the motors are correctly wired.

If I start the homing sequence, the Z-axis goes down (in stead of up!) apr. 10mm than stops. In the log it says "ALARM: Homing fail" and the machine freezes...

Anyone seen this before?
Any suggestion?

Code: Select all

================================================================
== Send $H  ==
================================================================
Test Waiting...
<Idle,MPos:0.000,0.000,-10.000,WPos:0.000,0.000,-10.000,Buf:0,RX:0,Lim:111>
___________SET MACHINE STATE: JOGGING___________
___________SET MACHINE STATE: NEEDS_HOMING___________
___________SET MACHINE STATE: HOMING___________
___________gc_homing___________
___________$h ___________
ALARM: Homing fail
ok
My settings:

Code: Select all

$0=10 (step pulse, usec)
$1=255 (step idle delay, msec)
$2=0 (step port invert mask:00000000)
$3=5 (dir port invert mask:00000101)
$4=0 (step enable invert, bool)
$5=0 (limit pins invert, bool)
$6=0 (probe pin invert, bool)
$10=255 (status report mask:11111111)
$11=0.020 (junction deviation, mm)
$12=0.010 (arc tolerance, mm)
$13=0 (report inches, bool)
$20=0 (soft limits, bool)
$21=1 (hard limits, bool)
$22=1 (homing cycle, bool)
$23=0 (homing dir invert mask:00000000)
$24=100.000 (homing feed, mm/min)
$25=1000.000 (homing seek, mm/min)
$26=25 (homing debounce, msec)
$27=5.000 (homing pull-off, mm)
$100=40.000 (x, step/mm)
$101=40.000 (y, step/mm)
$102=40.000 (z, step/mm)
$110=5000.000 (x max rate, mm/min)
$111=5000.000 (y max rate, mm/min)
$112=5000.000 (z max rate, mm/min)
$120=400.000 (x accel, mm/sec^2)
$121=400.000 (y accel, mm/sec^2)
$122=400.000 (z accel, mm/sec^2)
$130=425.000 (x max travel, mm)
$131=465.000 (y max travel, mm)
$132=80.000 (z max travel, mm)
ok
Last edited by mrTheWheel on Fri Aug 19, 2016 1:08 pm, edited 1 time in total.

cvoinescu
Posts: 4442
Joined: Thu Jul 19, 2012 6:50 pm
Location: Camberley, UK
Contact:

Re: Homing problem. Z-axis moves down and stops

Post by cvoinescu » Thu Aug 11, 2016 2:55 pm

Please do not cross-post. I have deleted your nearly identical post on a two-year-old, off-topic thread.

What you describe can mean that your Z homing switch appears actuated when it actually isn't, so the machine is trying to back off it, and gives up after 10 mm. Maybe you've wired it NC when it should be NO, or the other way round? Note that some boards have Schmitt triggers that may invert the state of the pins, so that you need to set the software to NO but use NC switches, or the other way round.
Proud owner of ShapeOko #709, eShapeOko #0, and of store.amberspyglass.co.uk

mrTheWheel
Posts: 5
Joined: Mon Jul 25, 2016 11:05 pm

Re: Homing problem. Z-axis moves down and stops

Post by mrTheWheel » Fri Aug 12, 2016 9:31 am

cvoinescu wrote:Please do not cross-post. I have deleted your nearly identical post on a two-year-old, off-topic thread.
Yes, I posted the same problem on a poll to elaborate that I voted for "Homing only" but that the homing in fact has not been succes full so far!
Excuses for violating the rules!
cvoinescu wrote:What you describe can mean that your Z homing switch appears actuated when it actually isn't, so the machine is trying to back off it, and gives up after 10 mm. Maybe you've wired it NC when it should be NO, or the other way round? Note that some boards have Schmitt triggers that may invert the state of the pins, so that you need to set the software to NO but use NC switches, or the other way round.
But if so, wouldn't the same switch trigger the Switch-Limit? I use NO switches that detect the switch closing when jogging the XY or Z-axis into the switch..
Is there a way to test this? The Stepoko board has limit-switch ledjes that do not light until actually closing a switch :-(


===== later that day =====
I changed $23 and did some more test. The inverted homing does move the axis in the right direction, but still stops every 10mm. Repeatedly "Homing" brings the Z-axis into the switch slowly goes down a few mm and then goes all the way up again. Same for the X and Y axis so eventually the Spindle is at the Top, Right Back of the machine but with all the switches pressed in.
After that jogging one of the axis in either direction (+ or -) makes the machine slamming to the switches!!!

Code: Select all

====>> Changed $23=4 <<=========================================================
====>> homing dir invert mask:00000111 <<=======================================

___________gc_not_motion___________
___________$23=7 ___________
ok
___________gc_dwell___________
___________N0 G4P0.05 ___________
___________gc_get_offsets___________
___________$# ___________
[G54:0.000,0.000,0.000]
[G55:0.000,0.000,0.000]
[G56:0.000,0.000,0.000]
[G57:0.000,0.000,0.000]
[G58:0.000,0.000,0.000]
[G59:0.000,0.000,0.000]
[G28:0.000,0.000,0.000]
[G30:0.000,0.000,0.000]
[G92:0.000,0.000,0.000]
[TLO:0.000]
[PRB:0.000,0.000,0.000:0]
ok
___________gc_parser_state___________
___________$G ___________
[G0 G54 G17 G21 G90 G94 M0 M5 M9 T0 F0. S0.]
ok
<Idle,MPos:-420.000,-460.000,-75.000,WPos:-420.000,-460.000,-75.000,Buf:0,RX:0,Lim:000>


====>> $$ <<====================================================================
___________$$ ___________
$0=10 (step pulse, usec)
$1=255 (step idle delay, msec)
$2=0 (step port invert mask:00000000)
$3=5 (dir port invert mask:00000101)
$4=0 (step enable invert, bool)
$5=0 (limit pins invert, bool)
$6=0 (probe pin invert, bool)
$10=255 (status report mask:11111111)
$11=0.020 (junction deviation, mm)
$12=0.010 (arc tolerance, mm)
$13=0 (report inches, bool)
$20=0 (soft limits, bool)
$21=1 (hard limits, bool)
$22=1 (homing cycle, bool)
$23=7 (homing dir invert mask:00000111) <<====
$24=100.000 (homing feed, mm/min)
$25=1000.000 (homing seek, mm/min)
$26=25 (homing debounce, msec)
$27=5.000 (homing pull-off, mm)
$100=40.000 (x, step/mm)
$101=40.000 (y, step/mm)
$102=40.000 (z, step/mm)
$110=5000.000 (x max rate, mm/min)
$111=5000.000 (y max rate, mm/min)
$112=5000.000 (z max rate, mm/min)
$120=400.000 (x accel, mm/sec^2)
$121=400.000 (y accel, mm/sec^2)
$122=400.000 (z accel, mm/sec^2)
$130=425.000 (x max travel, mm)
$131=465.000 (y max travel, mm)
$132=80.000 (z max travel, mm)
ok


====>> Start Homing <<==========================================================
====>> Z-axis goes up apr. 10mm then stops <<===================================
====>> Repeat Homing until Z-axis hit switch, backsoff slowly <<================
====>> and then goes all the way up again till Limit Switch closed <<===========
====>> Repeat Homing until all axis are in Limit Switch <<======================
___________gc_homing___________
___________$h ___________
<Home,MPos:-420.000,-460.000,-75.000,WPos:-420.000,-460.000,-75.000,Buf:0,RX:0,Lim:000>
ok
<Idle,MPos:-420.000,-460.000,-75.000,WPos:-420.000,-460.000,-75.000,Buf:0,RX:0,Lim:000>
___________gc_wait_for_idle___________
___________N0 G4P0.005 ___________
ok
___________gc_sync___________
<Idle,MPos:-420.000,-460.000,-75.000,WPos:-420.000,-460.000,-75.000,Buf:0,RX:0,Lim:000>
___________gc_get_offsets___________
___________$# ___________
[G54:0.000,0.000,0.000]
[G55:0.000,0.000,0.000]
[G56:0.000,0.000,0.000]
[G57:0.000,0.000,0.000]
[G58:0.000,0.000,0.000]
[G59:0.000,0.000,0.000]
[G28:0.000,0.000,0.000]
[G30:0.000,0.000,0.000]
[G92:0.000,0.000,0.000]
[TLO:0.000]
[PRB:0.000,0.000,0.000:0]
ok
___________gc_parser_state___________
___________$G ___________
[G0 G54 G17 G21 G90 G94 M0 M5 M9 T0 F0. S0.]
ok
<Idle,MPos:-420.000,-460.000,-75.000,WPos:-420.000,-460.000,-75.000,Buf:0,RX:0,Lim:000>

====>> Goto Jogging <<==========================================================
___________SET MACHINE STATE: JOGGING___________
___________gc_motion___________
___________N0G1X-415.000Y-425.000Z-51.550F1039.2 ___________
ok
==========>>> Jogging [Z-] all hell breaks lose!!! <<<==========================
==========>>> All axis hitting the limit switches to the max <<<================
<Run,MPos:-419.675,-457.800,-73.525,WPos:-419.675,-457.800,-73.525,Buf:1,RX:0,Lim:000>
<Run,MPos:-419.275,-454.975,-71.625,WPos:-419.275,-454.975,-71.625,Buf:1,RX:0,Lim:000>
<Run,MPos:-418.875,-452.100,-69.700,WPos:-418.875,-452.100,-69.700,Buf:1,RX:0,Lim:000>
<Run,MPos:-418.450,-449.225,-67.775,WPos:-418.450,-449.225,-67.775,Buf:1,RX:0,Lim:000>
<Run,MPos:-418.050,-446.375,-65.875,WPos:-418.050,-446.375,-65.875,Buf:1,RX:0,Lim:000>
<Run,MPos:-417.650,-443.500,-63.950,WPos:-417.650,-443.500,-63.950,Buf:1,RX:0,Lim:000>
<Run,MPos:-417.225,-440.650,-62.025,WPos:-417.225,-440.650,-62.025,Buf:1,RX:0,Lim:000>
<Run,MPos:-416.825,-437.800,-60.125,WPos:-416.825,-437.800,-60.125,Buf:1,RX:0,Lim:000>
<Run,MPos:-416.425,-434.950,-58.200,WPos:-416.425,-434.950,-58.200,Buf:1,RX:0,Lim:000>
<Run,MPos:-416.000,-432.075,-56.300,WPos:-416.000,-432.075,-56.300,Buf:1,RX:0,Lim:000>
<Run,MPos:-415.600,-429.200,-54.375,WPos:-415.600,-429.200,-54.375,Buf:1,RX:0,Lim:000>
<Run,MPos:-415.200,-426.350,-52.450,WPos:-415.200,-426.350,-52.450,Buf:1,RX:0,Lim:000>
<Idle,MPos:-415.000,-425.000,-51.550,WPos:-415.000,-425.000,-51.550,Buf:0,RX:0,Lim:000>

======>> pressing [Z-] again the spindle goes down a mm <<======================

___________gc_motion___________
___________N0G1X-415.000Y-425.000Z-52.550F600.0 ___________
ok
<Idle,MPos:-415.000,-425.000,-52.550,WPos:-415.000,-425.000,-52.550,Buf:0,RX:0,Lim:000>
___________gc_motion___________
___________N0G1X-414.000Y-425.000Z-52.550F600.0 ___________
ok
<Idle,MPos:-414.000,-425.000,-52.550,WPos:-414.000,-425.000,-52.550,Buf:0,RX:0,Lim:000>
___________gc_motion___________
___________N0G1X-413.000Y-425.000Z-52.550F600.0 ___________
ok
<Idle,MPos:-413.000,-425.000,-52.550,WPos:-413.000,-425.000,-52.550,Buf:0,RX:0,Lim:000>
___________gc_motion___________
___________N0G1X-414.000Y-425.000Z-52.550F600.0 ___________
ok
___________gc_motion___________
___________N0G1X-415.000Y-425.000Z-52.550F600.0 ___________
<Run,MPos:-414.550,-425.000,-52.550,WPos:-414.550,-425.000,-52.550,Buf:1,RX:0,Lim:000>
<Idle,MPos:-415.000,-425.000,-52.550,WPos:-415.000,-425.000,-52.550,Buf:0,RX:0,Lim:000>
___________gc_motion___________
___________N0G1X-415.000Y-424.000Z-52.550F600.0 ___________
ok
___________gc_motion___________
___________N0G1X-415.000Y-423.000Z-52.550F600.0 ___________
<Run,MPos:-415.000,-423.450,-52.550,WPos:-415.000,-423.450,-52.550,Buf:1,RX:0,Lim:000>
___________gc_motion___________
___________N0G1X-415.000Y-422.000Z-52.550F600.0 ___________
ok
<Idle,MPos:-415.000,-422.000,-52.550,WPos:-415.000,-422.000,-52.550,Buf:0,RX:0,Lim:000>
___________gc_motion___________
___________N0G1X-415.000Y-421.000Z-52.550F600.0 ___________
ok
<Idle,MPos:-415.000,-421.000,-52.550,WPos:-415.000,-421.000,-52.550,Buf:0,RX:0,Lim:000>
___________gc_motion___________
___________N0G1X-415.000Y-422.000Z-52.550F600.0 ___________
ok
___________gc_motion___________
___________N0G1X-415.000Y-423.000Z-52.550F600.0 ___________
<Run,MPos:-415.000,-422.550,-52.550,WPos:-415.000,-422.550,-52.550,Buf:1,RX:0,Lim:000>
___________gc_motion___________
___________N0G1X-415.000Y-424.000Z-52.550F600.0 ___________
ok
<Idle,MPos:-415.000,-424.000,-52.550,WPos:-415.000,-424.000,-52.550,Buf:0,RX:0,Lim:000>
___________gc_motion___________
___________N0G1X-415.000Y-425.000Z-52.550F600.0 ___________
ok
<Idle,MPos:-415.000,-425.000,-52.550,WPos:-415.000,-425.000,-52.550,Buf:0,RX:0,Lim:000>
So, setting $23 to 7 seems like a good idea. But how to proceed now????

But now, even if I reset the Stepoko and try to jog f.i. the X-axis, the machine seems to move all the way to the Homing position untill it hits a limit switch

Code: Select all

___________SET MACHINE STATE: JOGGING___________
___________gc_motion___________
___________N0G1X414.000Y425.000Z52.550F600.0 ___________
ok
<Run,MPos:1.100,1.125,0.150,WPos:1.100,1.125,0.150,Buf:1,RX:0,Lim:111>
<Run,MPos:2.500,2.575,0.325,WPos:2.500,2.575,0.325,Buf:1,RX:0,Lim:111>
<Run,MPos:3.875,4.000,0.500,WPos:3.875,4.000,0.500,Buf:1,RX:0,Lim:111>
<Run,MPos:5.275,5.425,0.675,WPos:5.275,5.425,0.675,Buf:1,RX:0,Lim:111>
<Run,MPos:6.675,6.850,0.850,WPos:6.675,6.850,0.850,Buf:1,RX:0,Lim:111>
<Run,MPos:8.050,8.275,1.025,WPos:8.050,8.275,1.025,Buf:1,RX:0,Lim:111>
<Run,MPos:9.450,9.700,1.200,WPos:9.450,9.700,1.200,Buf:1,RX:0,Lim:111>
<Run,MPos:10.850,11.125,1.375,WPos:10.850,11.125,1.375,Buf:1,RX:0,Lim:111>
<Run,MPos:12.225,12.550,1.550,WPos:12.225,12.550,1.550,Buf:1,RX:0,Lim:111>
<Run,MPos:13.625,13.975,1.725,WPos:13.625,13.975,1.725,Buf:1,RX:0,Lim:111>
<Run,MPos:15.000,15.400,1.900,WPos:15.000,15.400,1.900,Buf:1,RX:0,Lim:111>
<Run,MPos:16.400,16.850,2.075,WPos:16.400,16.850,2.075,Buf:1,RX:0,Lim:111>
<Run,MPos:17.775,18.250,2.250,WPos:17.775,18.250,2.250,Buf:1,RX:0,Lim:111>
<Run,MPos:19.175,19.675,2.425,WPos:19.175,19.675,2.425,Buf:1,RX:0,Lim:111>
<Run,MPos:20.575,21.125,2.600,WPos:20.575,21.125,2.600,Buf:1,RX:0,Lim:111>
<Run,MPos:21.975,22.550,2.800,WPos:21.975,22.550,2.800,Buf:1,RX:0,Lim:111>
<Run,MPos:23.375,23.975,2.975,WPos:23.375,23.975,2.975,Buf:1,RX:0,Lim:111>
<Run,MPos:24.750,25.400,3.150,WPos:24.750,25.400,3.150,Buf:1,RX:0,Lim:111>
<Run,MPos:26.150,26.825,3.325,WPos:26.150,26.825,3.325,Buf:1,RX:0,Lim:111>
<Run,MPos:27.525,28.275,3.500,WPos:27.525,28.275,3.500,Buf:1,RX:0,Lim:111>
<Run,MPos:28.925,29.700,3.675,WPos:28.925,29.700,3.675,Buf:1,RX:0,Lim:111>
<Run,MPos:30.325,31.125,3.850,WPos:30.325,31.125,3.850,Buf:1,RX:0,Lim:111>
<Run,MPos:31.700,32.550,4.025,WPos:31.700,32.550,4.025,Buf:1,RX:0,Lim:111>
<Run,MPos:33.100,33.975,4.200,WPos:33.100,33.975,4.200,Buf:1,RX:0,Lim:111>
<Run,MPos:34.500,35.400,4.375,WPos:34.500,35.400,4.375,Buf:1,RX:0,Lim:111>
<Run,MPos:35.875,36.825,4.550,WPos:35.875,36.825,4.550,Buf:1,RX:0,Lim:111>
<Run,MPos:37.275,38.250,4.725,WPos:37.275,38.250,4.725,Buf:1,RX:0,Lim:111>
<Run,MPos:38.675,39.700,4.900,WPos:38.675,39.700,4.900,Buf:1,RX:0,Lim:111>
<Run,MPos:40.050,41.100,5.075,WPos:40.050,41.100,5.075,Buf:1,RX:0,Lim:111>
<Run,MPos:41.450,42.550,5.250,WPos:41.450,42.550,5.250,Buf:1,RX:0,Lim:111>
<Run,MPos:42.825,43.975,5.425,WPos:42.825,43.975,5.425,Buf:1,RX:0,Lim:111>
<Run,MPos:44.225,45.400,5.625,WPos:44.225,45.400,5.625,Buf:1,RX:0,Lim:111>
<Run,MPos:45.625,46.825,5.800,WPos:45.625,46.825,5.800,Buf:1,RX:0,Lim:111>
<Run,MPos:47.000,48.250,5.975,WPos:47.000,48.250,5.975,Buf:1,RX:0,Lim:111>
<Run,MPos:48.400,49.700,6.150,WPos:48.400,49.700,6.150,Buf:1,RX:0,Lim:111>
<Run,MPos:49.800,51.125,6.325,WPos:49.800,51.125,6.325,Buf:1,RX:0,Lim:111>
ALARM: Hard limit
[Reset to continue]
___________GRBL WATCHDOG EXPIRED___________
___________SET MACHINE STATE: NOTCONNECTED___________
I'm a newby and have no idea what all the log messages mean. But I do understand the "ALARM: Hard limit" message..

mrTheWheel
Posts: 5
Joined: Mon Jul 25, 2016 11:05 pm

Stepoko Homing problem. Z-axis moves down and stops (SOLVED)

Post by mrTheWheel » Fri Aug 19, 2016 1:28 pm

cvoinescu wrote:What you describe can mean that your Z homing switch appears actuated when it actually isn't, so the machine is trying to back off it, and gives up after 10 mm.
This seems to be a Stepoko problem, and @cvoinescu was right.

I probably don't understand the Stepoko schematic because, as I read it, the LED's on the Stepoko go "on" if the limit-switch is "closed" and "off" when it is "open" (depending on the state of SW5 that I have on the "Normal Open" position). In my setup the Limit-LEDs go "on" if the switch is closed... If I'm right a closed switch makes the Arduino (ATmega) pin goes Hight!
My mistake is thínking that there is no problem with the limit switches because they did what they are supposed to do .. but the limiting does not mind how the switches are connected (open->close or close->open) because the limiting is triggered on a state CHANGE! So, limiting will always work.

Now, for the homing process it does matter how the switches operate because the process moves to the plus site until a switch is closed, than back's-up (negative) until it is open again and than very slowly moves up until the switch is closed again (which is the machine zero for that axis).

And indeed, the phenomenon I had was the process where GRBL reads a closed switch (although it really is open!) trying to backup until the switch opens again .. and quitting after 10mm or so.

It seems there is a parameter in GRBL to invert the reading of the switches for Homing alone. If you set $5=1 (limit pins invert) magically homing works!!!!

SparkFun could not help me with this as they didn't use homing and Carbide (Edward Ford) was at the point of sending me a Carbide Motion Board (which I think is far beyond normal service)!!!

For me it works! Problem Solved

Winanszero
Posts: 17
Joined: Tue Mar 31, 2015 8:56 pm

Re: StepOKO Homing problem. Z-axis moves down and stops (SOL

Post by Winanszero » Sun Nov 06, 2016 4:16 pm

This has been a helpful thread for me. I had an issue where homing was not working until I set $5=0 and $23=3 on my machine. I couldn't understand why the limit alarms were tripping the instant I hit $H, even when no switches were connected to the board (ruling out noise as a factor).

Cheers,
Bill

Post Reply