grblHAL / SAM3X8E

grblHAL driver for Atmel SAM3X8E (Arduino Due)
Other
12 stars 11 forks source link

$5 Endstop Inverting Issues #23

Closed JackDaviesDesign closed 6 months ago

JackDaviesDesign commented 6 months ago

Hi,

I am trying to move from GRBL on a CNC shield to GRBLHAL on SMART RAMPS and Due. I am using NPN NO inductive sensors.

I am having issues getting the end stop config to work using the $5 parameter. I have included the result of the different options below.


$5 = 0 
Both Y axis end stops working (auto square) Each one just triggers Y, should they not be Y & Y1?
X & Z do not change state when actuated. They are shown as triggered and don’t change when actuated.

$5 = 1
Both Y axis end stops working (auto square) Each one just triggers Y, should they not be Y & Y1?
X is triggering but is inverted. Z is same as $5 = 0

$5 = 2
All inputs are shown as triggered when not, do not change state when actuated.

$5 = 3
X is triggering but is inverted. Others are shown as triggered but do not change state.

$5 = 4
Y is same as $5 = 0. Z is now working but is inverted. X is not responding.

$5 = 5
XYZ is responding but XZ are inverted.

$5 = 6
XY is inverted and not triggering, Z triggers but is inverted.

$5 = 7
XY is inverted and not triggering, Z triggers but is inverted.

Any help is greatly appreciated!

Jack

terjeio commented 6 months ago

Each one just triggers Y, should they not be Y & Y1?

If in the realtime report then only a single state for each axis is shown, all limit inputs are combined for that. If you want to check status for the individual limit inputs use the $lim command.

With $5=7 what are the voltages on the limit inputs when none are triggered?

JackDaviesDesign commented 6 months ago

Thanks for the quick reply, that's good to know about the $lim command.

I tested all of the inputs electrically, they each output 3.3v when triggered. I am using a level shifter as the sensors need 5v to function.

It's strange because they all trigger at some point with a variation of $5 = 1-7 but do not invert as expected.

JackDaviesDesign commented 6 months ago

This is the result of actuating the endstops and the result of $lim

$lim X Actuated - [LIMITS:Y,Z,Y,] Y1 Actuated - [LIMITS:XY,Z,,] Y2 Actuated - [LIMITS:X,Z,Y,] Z Actuated - [LIMITS:XY,,Y,] Nothing Actuated - [LIMITS:XY,Z,Y,]

This is with $5 = 7

terjeio commented 6 months ago

And with $5=0? It looks like your switches are wired as NC. Since this board has max inputs (for X and Z) the unused inputs should be grounded so that they do not mess up the combined state. BTW I am currently away and do not have access to boards with max inputs so cannot check myself before I am back (next month).

JackDaviesDesign commented 6 months ago

Thanks for the tip, grounding the unused inputs did the trick! Thank you for your help!