Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of autonomousRobotAndroid by
MaxonESCON Class Reference
This class implements the driver for the Maxon ESCON servo driver. For more information see the Datasheet: http://escon.maxonmotor.com More...
#include <MaxonESCON.h>
Public Member Functions | |
| MaxonESCON (PinName enb, PinName isenb, PinName pwm, PinName actualSpeed, Hallsensor *hall) | |
| Create a motor control object. | |
| void | setVelocity (float speed) |
| Set the speed of the motor with a pwm for 10%..90%. | |
| float | getActualSpeed (void) |
| Return the speed from ESCON. | |
| void | period (float period) |
| Set the period of the pwm duty cycle. | |
| void | enable (bool enb) |
| Set the motor to a enable sate. | |
| bool | isEnabled (void) |
| Tests if the servo drive is enabled. | |
| int | getPulses (void) |
| Return the number of pulses. | |
| int | setPulses (int setPos) |
| Set the pulses of the motor, given in [count]. | |
Detailed Description
This class implements the driver for the Maxon ESCON servo driver. For more information see the Datasheet: http://escon.maxonmotor.com
Copyright (c) 2013 HSLU Pren Team #1 Cruising Crêpe All rights reserved.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Definition at line 27 of file MaxonESCON.h.
Constructor & Destructor Documentation
| MaxonESCON | ( | PinName | enb, |
| PinName | isenb, | ||
| PinName | pwm, | ||
| PinName | actualSpeed, | ||
| Hallsensor * | hall | ||
| ) |
Create a motor control object.
- Parameters:
-
enb DigitalOut, set high for enable isenb DigitalIn, high for enable pwm PwmOut pin, set the velocity actualSpeed AnalogIn filtered signal for ActualSpeed from Motor hall The object of the hallsensor from Motor
Definition at line 5 of file MaxonESCON.cpp.
Member Function Documentation
| void enable | ( | bool | enb ) |
Set the motor to a enable sate.
- Parameters:
-
enb falsefor disabletruefor enable.
Definition at line 57 of file MaxonESCON.cpp.
| float getActualSpeed | ( | void | ) |
Return the speed from ESCON.
0 rpm is defined in the analog input as 1.65V
- Returns:
- speed of the motor, given in [1/s]
Definition at line 47 of file MaxonESCON.cpp.
| int getPulses | ( | void | ) |
Return the number of pulses.
- Returns:
- Pulses, given in [count]
Definition at line 75 of file MaxonESCON.cpp.
| bool isEnabled | ( | void | ) |
Tests if the servo drive is enabled.
- Returns:
trueif the drive is enabled,falseotherwise.
Definition at line 66 of file MaxonESCON.cpp.
| void period | ( | float | period ) |
Set the period of the pwm duty cycle.
Wrapper for PwmOut::period()
- Parameters:
-
period Pwm duty cycle, given in [s].
Definition at line 52 of file MaxonESCON.cpp.
| int setPulses | ( | int | setPos ) |
Set the pulses of the motor, given in [count].
- Returns:
- Pulses, given in [count]
Definition at line 81 of file MaxonESCON.cpp.
| void setVelocity | ( | float | speed ) |
Set the speed of the motor with a pwm for 10%..90%.
50% PWM is 0rpm. Caclulate from [1/s] in [1/min] and the factor of the ESCON.
- Parameters:
-
speed The speed of the motor as a normalised value, given in [1/s]
Definition at line 35 of file MaxonESCON.cpp.
Generated on Wed Jul 13 2022 04:37:19 by
1.7.2
