2014-09-12 02:22 AM
Hi,
I'm wondering what is the best approach to proceed with homing, let's say we have two limit switches CW and CCW, when system starts and none of them are pressed it's easy to proceed with homing, i.e moving to CW direction, find lower limits, reset ABS register, move towards CCW and find upper limits,but what if when system starts, for any reason, one of two limit switches are already pressed?there is only one SW pin on L6472, CW and CCW limit switches are usually to be connected in parallel, what is the right direction for release the switch?Actually to solve this dilemma i've used this workaround, add redundant MCU GPIO pins to limit switches, to check any limits before starting homing procedure.I'm wondering if there a more smarter way (i.e. check motor current or whatever) to resolve this issues.Best RegardsMassimiliano2014-09-22 11:36 PM
Hi Massimiliano,
I think you can avoid the extra GPIO. You can try with this procedure: 1. check the SW status through the STATUS register of the L6472 2. if the SW input is forced low try performing a small movement in CW (or CCW) direction 3. if the SW is released that means that the limit sitch forcing the signal is the CW (or CCW) one, otherwise it is the opposite. 4. proceed with the normal homing strategy Take care that the L6472, by default, cause an hardstop when the SW input is forced low, so if the input is low at power-up the power stage is enabled and you need to set it in high impedance before setting the configuration parameters. Regards Enrico2015-04-02 12:15 PM
Hi Enrico,
about the last line in your last message...There is a way to avoid the power stage to switch ON even if SW is low at power-up?This because I want to eliminate the small time between the stage enabling at start-up and my disable command.Thanks, Lorenzo2015-04-08 02:56 AM
Hi Lorenzo,
Unfortunately it is an automatic procedure. There is no way to disable it. You can use one GPIO of your MCU to temporary bypass the limit switch as described in the attached schematic. Keeping the GPIO output high until the automatic HardStop is disabled should avoid the power stage turn-on. As soon as the configuraton is changed, the GPIO must be disabled (high impedance). Regadrs Ernico ________________ Attachments : example.pdf : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HzGa&d=%2Fa%2F0X0000000bJJ%2FNBk9KPgJxlxoDcsz83DSl5me7sovajQYCxDU3Pyby_g&asPdf=false