Limit switches and other inputs

Hello,

I’m working on a CNC machine using the Root CNC controller (Rev3), closed loop steppers and a VFD powered spindle.
I’ve managed to get the machine running and have already done some small jobs using a diode laser. Anyhow I still need to wire up my limit switches and get the controller to communicate with the closed loop drivers.

For my limit switches I was thinking to wire them up like this so I can configure the software in a way that it recognizes if it is at it’s axis positive or negative limit:


Can anyone tell me if this will work and how my config should look like, I’m guessing something like this:

X:
motor0:
      limit_neg_pin: GPIO34:High
      limit_pos_pin: GPIO34:Low
      limit_all_pin: NO_PIN

Similarly I would like to know how to configure my closed loop stepper ALM and COM signals in the config file… (I have wired all 4 motor drivers ALM/COM to the *-PIN GPIO15) I’m not that experienced with coding and have no clue what kind of data is being exchanged over these lines. I am pretty sure I’m doing something stupid so please help me out since I couldn’t find any information on this.

Thanks in advance!

Hey,

Typically, you have one input which used used for both limit switches, as the machine knows which direction it is moving and can infer which limit switch it has hit. This method saves on IO on the controller.

As for the wiring, please see the wiki for more information (wiki.rootcnc.com)

as for the alarm pin, please us the input definition of " fault_pin:" in the YAML file. maybe this video will help:

If you need someone to talk through stuff - don’t forget you can buy support on the Root CNC website, where you can get video call to talk through stuff.

Kind Regards Pete