core icon indicating copy to clipboard operation
core copied to clipboard

How to define estop pin and how to invert it

Open karoria opened this issue 3 years ago • 8 comments

Hello grblHALians!! After enabling estop, I define estop pin like this "#define ESTOP_PIN (14u)" bit it doesn't seem to work. Kindly guide me on defining it, as I have not seen it in any exmple map file. Further, how to invert it for NO or NC? Thanks in advance.

karoria avatar Dec 15 '21 02:12 karoria

It is supported by the iMXRT1062 driver, perhaps a few more. It is implemented by repurposing the reset input. Search for ESTOP_ENABLE to see the rest of the implementation details.

When available inversion is by a bit in the $14 setting, send $$=14 for info.

terjeio avatar Dec 15 '21 05:12 terjeio

Does that mean, I have to connect ESTOP with reset input on the controller board and I dont need to define any separate Estop pin?

karoria avatar Dec 15 '21 06:12 karoria

You don't have to, it is possible to have both. But if only one of them you have to define the estop pin instead of the reset pin (with the same pin definition).

terjeio avatar Dec 15 '21 06:12 terjeio

Then why I am not getting it working? Is my syntex correct? for pin definition. BTW, I am using teensy4.1.

karoria avatar Dec 15 '21 07:12 karoria

Then why I am not getting it working? Is my syntex correct?

Where can I see what you have done? You have your own pin map file?

terjeio avatar Dec 15 '21 10:12 terjeio

Yes. I have custom pinmap, where I have defined both reset as well as estop pins on separate pins. Sorry, I am not currently on my PC.!

karoria avatar Dec 15 '21 10:12 karoria

I have defined both reset as well as estop pins on separate pins

That explains it - driver.c has to be modified to support both at the same time. Check the code I linked to above. The core can handle both, that is why the inversion bits are different.

terjeio avatar Dec 15 '21 11:12 terjeio

Thanks. I will try it.

karoria avatar Dec 15 '21 13:12 karoria