-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mks sbase z-probe wont invert #49
Comments
Limit switches expect an NC switch by default (for protecting from broken wires), but the probe pin should not. The default behaviour with $6=0 should be that the pin is pulled up from the board and the probe trigges when you connect the pin to ground. |
Are you sure that you use the probe pin for the probe? This pin should not have anything to do with the limit pins and config. |
Yes so maybe I got it a little confused at the beginning talking about the limit switches. I tried reflashing and this didn't change anything. So when I do connect the probe, it does work just |
The setup you are describing should work. Trying on my setup ($6=0, probe connected to pin P1.27), here is the status output of an open probe and a closed probe.
|
I was never able to get it to work normally. I ended up just changing the code to invert what is returned, and it seems to be working just fine. For some reason changing to $6=1 never did anything at all. Since no one else seems to have the issue, I just chalk it up to some form of board defect that isn't of major issue. Maybe a bad pullup or down, whichever one it is, I can never remember. |
I'm not sure how many people have used this function, so folks other than yourself may have had the same issue. I think I found the problem, I haven't done any testing yet. Probe.c line 25 should probably be changed to a uint32_t from an 8 bit. I never tested trying to invert it the output with previous testing. Right now the logic is I can try testing this out, but it might be a few days before I get a chance to re-setup a build environment for this. |
@tscofield Good catch! This may have been forgotten when porting grbl to LPC. If you have time, please add a pull request after testing. Thanks! |
Correct 32bit mask for probe invert. Probe Physically Open $6=0 <Alarm|WPos:0.000,0.000,0.000,0.000|FS:0,0|Pn:ZA|WCO:0.000,0.000,0.000,0.000> Probe is not triggered $6=1 <Alarm|WPos:0.000,0.000,0.000,0.000|FS:0,0|Pn:PZA|Ov:100,100,100> Probe is triggered Probe Physically Closed $6=0 <Alarm|WPos:0.000,0.000,0.000,0.000|FS:0,0|Pn:ZA|WCO:0.000,0.000,0.000,0.000> Probe is not triggered $6=1 <Alarm|WPos:0.000,0.000,0.000,0.000|FS:0,0|Pn:PZA|Ov:100,100,100> Probe is triggered
Fix for issue #49 (probe invert mask 8 bit instead of 32)
Hello,
I am working on setting up a cnc using a MKS Sbase.
I noticed in testing my limit switches that the probe pin was showing as activated. I changed the $6 to invert it however this has made no change. It appears to be expecting a NC switch either way but I am using a touchplate with 2 wires. When I attempt to run a probe command it fails saying the switch is in the wrong state.
I am using the precompiled bin file. is there a setting somewhere i need to change and compile myself?
The text was updated successfully, but these errors were encountered: