Page 3 of 3

Re: Home/Limit switches

Posted: Tue Apr 16, 2019 12:21 pm
by Basicmicro Support
Set the high bit of the pwm mode(SETPWMMODE). Make sure you dont change the PWM mode though. 0x01 is the default setting so you should set the pwm mode to 0x81 to enable bridged mode and keep the default sign magnitude PWM modulation setting.

Re: Home/Limit switches

Posted: Wed Jun 05, 2019 4:56 am
by Ellimc
I am working to an auto homing programme and it seems that it does already exist.
I would like to know how do i have to connect my switch to the roboclaw? the switch that i work with is similare to the one sell on this web site ... lsrc=aw.ds

And also I would like to know if this line of code will be enough for an arduino board.
roboclaw.SetPinFunctions(uaddress, 0, 4,4);
Will it automatically make the homing after that command? or must I put an other line of code?
Thank you in advance

Re: Home/Limit switches

Posted: Thu Jun 06, 2019 10:25 am
by Basicmicro Support
For auto homing you need to set the pin functions to Home(Auto) using Motion Studio(General Settings). Then go to the Device menu and click Write Settings. These settings will be loaded and the homing routine will run automatically each time the board is powered on.

Yes, that switch looks appropriate for the task. The user manual shows how to wire limit switches. You can set the limit input to trigger on a low signal(normal operation) or on a high signal(inverted operation, eg the INV check box next to the pin mode drop down).

You can leave the default duty and timeout settings or modify them if you wish. The duty setting sets the power level(or percent of maximum speed) your motor will run at during homing and the timeout sets how long it will attempt to home.