Solo: Confused about SetPinFunctions and S2 ... S5 Modes and Firmware 4.1.33

General discussion of using Roboclaw motor controllers
Post Reply
cjr
Posts: 11
Joined: Fri Mar 01, 2019 3:13 am
Solo: Confused about SetPinFunctions and S2 ... S5 Modes and Firmware 4.1.33

Post by cjr »

Hello everybody,

we just went from 4.1.29 to 4.1.33. The "Limit Switches" or E-Stop are no longer working as before. Reading the Datasheet and User Guide leaves me in utter confusion :D. The Device is a RoboClaw Solo 30A, packet serial, communication is over USB only.

I have a linear movement with two limit switches, one at each end, connected in serial to S3 (according to the Datasheet. I already deduced that S3 in SetPinFunctions is NOT the S3 pin at the physical device.

With 4.1.29 i used SetPinFunctions to set S4 mode to SIGTYPE_LIMIT. Then the motor stopped if one of the switches was hit --> OK

This no longer works with 4.1.33.

In the Motion Studio i see an S2 function, but S2 is a serial data pin :?:
I also see an S3 function, which, when set to Limit Switch (both) no longer works with 4.1.33 :?:

The User guide and Motion Studio seem to suggest that i can set S2 to E-Stop also. But SetPinFunctions supports S3, S4 and S5, but not S2.

Suspicion: S2 in User Guide and Motion Studio is really S3 in SetPinFunctions and S3 is really S4. S5 is for the second motor and not used in the SOLO.

Still, how do i use S3 as a limit switch just like in 4.1.29 :?: And what exactly is the difference between the Limit Switch function and the E-Stop? Both stop the Motor.

Best Regards,

Christof
cjr
Posts: 11
Joined: Fri Mar 01, 2019 3:13 am
Re: Solo: Confused about SetPinFunctions and S2 ... S5 Modes and Firmware 4.1.33

Post by cjr »

Update:

4.1.29: SIGTYPE_LIMIT alone stopped in both directions
SIGTYPE_LIMIT | SIGFLAG_FORWARD stopped in forward direction
SIGTYPE_LIMIT | SIGFLAG_BACKWARD stopped in backward direction
SIGTYPE_LIMIT | SIGFLAG_FORWARD | SIGFLAG_BACKWARD stopped in neither direction

4.1.33: SIGTYPE_LIMIT alone stops in neither direction
SIGTYPE_LIMIT | SIGFLAG_FORWARD stops in forward direction
SIGTYPE_LIMIT | SIGFLAG_BACKWARD stops in backward direction
SIGTYPE_LIMIT | SIGFLAG_FORWARD | SIGFLAG_BACKWARD stops in both directions

4.1.33 behaviour makes more sense, btw :D

Found out the hard way, RoboClaw moved past my limit switches .... BANG :!: :!: :!:

EDIT:

Oh, i need to use S3Mode = SIGTYPE_ESTOP and S4Mode like above in SetPinFunctions
User avatar
Basicmicro Support
Posts: 1594
Joined: Thu Feb 26, 2015 9:45 pm
Re: Solo: Confused about SetPinFunctions and S2 ... S5 Modes and Firmware 4.1.33

Post by Basicmicro Support »

Sorry about that. We changed it so it was more intuitive in the later release. We should have set it so either case(setting both directions or setting neither direction) would stop the motors if triggered in either direction.

I've fixed that now. In the next release if you set the pin type to SIGTYPE_LIMIT but dont set either forward or backward flags, both will be set automatically.
cjr
Posts: 11
Joined: Fri Mar 01, 2019 3:13 am
Re: Solo: Confused about SetPinFunctions and S2 ... S5 Modes and Firmware 4.1.33

Post by cjr »

Great.

Still, i would like to know if i'm correct about the switches:

Physical S3 is S4 in the API?
S5 in the API is not used for the Solo?
S3 in the API is what? Can't be S2-Physical because that is the Serial, yes? Can't be S4-API because that is S3-Physical, yes? Why do i have to set S3-API if it does not exist?

Best Regards,

Christof
User avatar
Basicmicro Support
Posts: 1594
Joined: Thu Feb 26, 2015 9:45 pm
Re: Solo: Confused about SetPinFunctions and S2 ... S5 Modes and Firmware 4.1.33

Post by Basicmicro Support »

Sorry I missed that in your previous post.

When manually setting the pin functions, Solo S2 is set using the S3 argument and Solo S3 is set using the S4 argument. The S5 argument is ignored.

Note that when Solo is in RC/Analog modes, its S2 pin functions like other Roboclaw S3 pins, but when in either serial mode it functions like other Roboclaw S2 pins(eg TX for packet serial or optional Slave Select for simple serial).

Post Reply