Christian Burri / Mbed 2 deprecated autonomousRobotAndroid

Dependencies:   mbed

Fork of autonomousRobotAndroid by Christian Burri

Embed: (wiki syntax)

« Back to documentation index

MaxonESCON Class Reference

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

Author:
Christian Burri

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:
enbDigitalOut, set high for enable
isenbDigitalIn, high for enable
pwmPwmOut pin, set the velocity
actualSpeedAnalogIn filtered signal for ActualSpeed from Motor
hallThe 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:
enbfalse for disable true for 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:
true if the drive is enabled, false otherwise.

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:
periodPwm 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:
speedThe speed of the motor as a normalised value, given in [1/s]

Definition at line 35 of file MaxonESCON.cpp.