Roboclaw Solo: Setting S3 mode via packet serial
Roboclaw Solo: Setting S3 mode via packet serial
S3 can be set to act as a limit switch (reverse) via the Basicmicro Motion Studio GUI,
however the user manual doesn't explain how to do so using packet serial. The user manual appears to be out of date for the solo: there's no S4 or S5 on this model.
Essentially I'd like to know what to throw in this function to set S3 to be the limit switch for reverse motion:
Using python on windows
Connected to serial using FTDI cable
13V power supply
Normally open limit switch connected to S3 and GND
Thanks in advance!
however the user manual doesn't explain how to do so using packet serial. The user manual appears to be out of date for the solo: there's no S4 or S5 on this model.
Essentially I'd like to know what to throw in this function to set S3 to be the limit switch for reverse motion:
Code: Select all
roboclaw.SetPinFunctions(0x80,???,0,0)
Connected to serial using FTDI cable
13V power supply
Normally open limit switch connected to S3 and GND
Thanks in advance!
- Basicmicro Support
- Posts: 1594
- Joined: Thu Feb 26, 2015 9:45 pm
Re: Roboclaw Solo: Setting S3 mode via packet serial
The SetPinFunctions commands has changed quite a bit and yes the manual is out of date on this particular command.
We go into detail on the changes in this forum post: viewtopic.php?f=2&t=528
It doesnt talk specifically about the Solo but the new system used by the SetPinFunctions command works the same on Solo. Solo S3 effectively works the same as other Roboclaw S4 pins as far as the auxilliary functions are concerned.
We go into detail on the changes in this forum post: viewtopic.php?f=2&t=528
It doesnt talk specifically about the Solo but the new system used by the SetPinFunctions command works the same on Solo. Solo S3 effectively works the same as other Roboclaw S4 pins as far as the auxilliary functions are concerned.
Re: Roboclaw Solo: Setting S3 mode via packet serial
I figured it out by setting the functionality through the GUI then reading the pin modes using
It printed
which is strange considering your post says reverse limit is 0x20, which is 32.
Any idea what that's about?
Thanks for the response by the way.
Code: Select all
rc.ReadPinFunctions(0x80)
Code: Select all
(1, 0, 34, 0)
Any idea what that's about?
Thanks for the response by the way.
- Basicmicro Support
- Posts: 1594
- Joined: Thu Feb 26, 2015 9:45 pm
Re: Roboclaw Solo: Setting S3 mode via packet serial
You combine multiple things to make a setting.
For a reverse limit you combine SIGTYPE_LIMIT 0x02 and SIGFLAG_BACKWARD 0x20 which produces 0x22(34).
Every mode must have a SIGTYPE set. Then you set specific SIGFLAGs for that mode.
For a reverse limit you combine SIGTYPE_LIMIT 0x02 and SIGFLAG_BACKWARD 0x20 which produces 0x22(34).
Every mode must have a SIGTYPE set. Then you set specific SIGFLAGs for that mode.