Robot
The embedded systems for UTRA's autonomous humanoid soccer-playing robot
Collaboration diagram for Header:

Functions

void Dynamixel_SetID (Dynamixel_HandleTypeDef *hdynamixel, uint8_t ID)
 Sets the ID (identification number) for the current motor. More...
 
void Dynamixel_SetBaudRate (Dynamixel_HandleTypeDef *hdynamixel, uint32_t baud)
 Sets the baud rate of a particular motor. More...
 
void Dynamixel_SetReturnDelayTime (Dynamixel_HandleTypeDef *hdynamixel, uint16_t microSec)
 Sets the time, in microseconds, that the motor should wait before returning a status packet. More...
 
void Dynamixel_SetCWAngleLimit (Dynamixel_HandleTypeDef *hdynamixel, float minAngle)
 Sets the clockwise angle limit for the current motor. More...
 
void Dynamixel_SetCCWAngleLimit (Dynamixel_HandleTypeDef *hdynamixel, float maxAngle)
 Sets the counter-clockwise angle limit for the current motor. More...
 
void Dynamixel_SetHighestVoltageLimit (Dynamixel_HandleTypeDef *hdynamixel, float highestVoltage)
 Sets the highest operating voltage limit for the current motor. More...
 
void Dynamixel_SetLowestVoltageLimit (Dynamixel_HandleTypeDef *hdynamixel, float lowestVoltage)
 Sets the lowest operating voltage limit for the current motor. More...
 
void Dynamixel_SetMaxTorque (Dynamixel_HandleTypeDef *hdynamixel, float maxTorque)
 Sets the maximum torque limit for all motor operations. More...
 
void Dynamixel_SetStatusReturnLevel (Dynamixel_HandleTypeDef *hdynamixel, uint8_t status_data)
 Sets the conditions under which a status packet will be returned. More...
 
void Dynamixel_SetAlarmLED (Dynamixel_HandleTypeDef *hdynamixel, uint8_t alarm_LED_data)
 Sets the conditions under which the motor LED will light up. More...
 
void Dynamixel_SetAlarmShutdown (Dynamixel_HandleTypeDef *hdynamixel, uint8_t alarm_shutdown_data)
 Sets the conditions under which the motor will turn off its torque. More...
 
void Dynamixel_TorqueEnable (Dynamixel_HandleTypeDef *hdynamixel, uint8_t isEnabled)
 Enables or disables torque for current motor. More...
 
void Dynamixel_LEDEnable (Dynamixel_HandleTypeDef *hdynamixel, uint8_t isEnabled)
 Toggles the motor LED. More...
 
void Dynamixel_SetGoalPosition (Dynamixel_HandleTypeDef *hdynamixel, float goalAngle)
 Sets the goal position of the motor in RAM. More...
 
void Dynamixel_SetGoalVelocity (Dynamixel_HandleTypeDef *hdynamixel, float goalVelocity)
 Sets the goal velocity of the motor in RAM. More...
 
void Dynamixel_SetGoalTorque (Dynamixel_HandleTypeDef *hdynamixel, float goalTorque)
 Sets the torque limit for the motor in RAM. More...
 
void Dynamixel_LockEEPROM (Dynamixel_HandleTypeDef *hdynamixel)
 Locks the EEPROM of the current motor until the next power cycle. More...
 
void Dynamixel_SetPunch (Dynamixel_HandleTypeDef *hdynamixel, float punch)
 Sets a quantity proportional to the minimum current supplied to the motor during operation. More...
 
void Dynamixel_GetPosition (Dynamixel_HandleTypeDef *hdynamixel)
 Reads the angular position of the motor in degrees. More...
 
void Dynamixel_GetVelocity (Dynamixel_HandleTypeDef *hdynamixel)
 Reads the angular velocity of the motor in RPM. More...
 
void Dynamixel_GetLoad (Dynamixel_HandleTypeDef *hdynamixel)
 Reads the "load", the percentage of the maximum torque the motor is exerting. More...
 
float Dynamixel_GetVoltage (Dynamixel_HandleTypeDef *hdynamixel)
 Reads the motor supply voltage. More...
 
uint8_t Dynamixel_GetTemperature (Dynamixel_HandleTypeDef *hdynamixel)
 Reads the internal motor temperature. More...
 
bool Dynamixel_IsRegistered (Dynamixel_HandleTypeDef *hdynamixel)
 Used to tell if a command sent was written to motor registers. More...
 
bool Dynamixel_IsMoving (Dynamixel_HandleTypeDef *hdynamixel)
 Indicates whether the motor is in motion. More...
 
bool Dynamixel_IsJointMode (Dynamixel_HandleTypeDef *hdynamixel)
 Indicates whether the motor is operating in joint mode or wheel mode. More...
 
void Dynamixel_SetIOType (ioFlags_t type)
 
ioFlags_t Dynamixel_GetIOType ()
 Gets the IO protocol setting for the library. More...
 
void Dynamixel_RegWrite (Dynamixel_HandleTypeDef *hdynamixel, uint8_t arrSize, uint8_t writeAddr, uint8_t param1, uint8_t param2)
 Implementation of the REG WRITE instruction with 2 parameters. More...
 
void Dynamixel_Action (Dynamixel_HandleTypeDef *hdynamixel)
 Implementation of the ACTION instruction. More...
 
int8_t Dynamixel_Ping (Dynamixel_HandleTypeDef *hdynamixel)
 Implementation of the PING instruction. More...
 
void Dynamixel_Init (Dynamixel_HandleTypeDef *hdynamixel, uint8_t ID, UART_HandleTypeDef *UART_Handle, GPIO_TypeDef *DataDirPort, uint16_t DataDirPinNum, enum motorTypes_e motorType)
 Initializes a motor handle. More...
 
void Dynamixel_Reset (Dynamixel_HandleTypeDef *hdynamixel)
 Resets motor control table. More...
 
void Dynamixel_EnterWheelMode (Dynamixel_HandleTypeDef *hdynamixel, float goalVelocity)
 Sets the control registers such that the rotational angle of the motor is not bounded. More...
 
void Dynamixel_EnterJointMode (Dynamixel_HandleTypeDef *hdynamixel)
 Sets the control registers such that the rotational angle of the motor is constrained between the default values. More...
 

Detailed Description

Function Documentation

◆ Dynamixel_Action()

void Dynamixel_Action ( Dynamixel_HandleTypeDef hdynamixel)

Implementation of the ACTION instruction.

This triggers the instruction registered by the REG WRITE instruction. This way, time delays can be reduced for the concurrent motion of several motors

Parameters
hdynamixelpointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor
Returns
None

Definition at line 592 of file DynamixelProtocolV1_IO.c.

Here is the call graph for this function:

◆ Dynamixel_EnterJointMode()

void Dynamixel_EnterJointMode ( Dynamixel_HandleTypeDef hdynamixel)

Sets the control registers such that the rotational angle of the motor is constrained between the default values.

Parameters
hdynamixelpointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor
Returns
None

Definition at line 1037 of file DynamixelProtocolV1.c.

Here is the call graph for this function:

◆ Dynamixel_EnterWheelMode()

void Dynamixel_EnterWheelMode ( Dynamixel_HandleTypeDef hdynamixel,
float  goalVelocity 
)

Sets the control registers such that the rotational angle of the motor is not bounded.

When the angle limits are both set to 0, then motor will attempt to rotate with maximum velocity. To prevent undesired behaviour, the goal velocity should be set right after calling this function

Parameters
hdynamixelpointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor
goalVelocitythe desired velocity in RPM to use when entering wheel mode
Returns
None

Definition at line 1023 of file DynamixelProtocolV1.c.

Here is the call graph for this function:

◆ Dynamixel_GetIOType()

ioFlags_t Dynamixel_GetIOType ( )

Gets the IO protocol setting for the library.

Returns
One of IO_POLL, IO_IT, or IO_DMA

Definition at line 410 of file DynamixelProtocolV1_IO.c.

◆ Dynamixel_GetLoad()

void Dynamixel_GetLoad ( Dynamixel_HandleTypeDef hdynamixel)

Reads the "load", the percentage of the maximum torque the motor is exerting.

Reads addresses 0x28 and 0x29 in the motor RAM to see what the current load is. Load is a percentage of the maximum torque. A value of 0-1023 gets translated into a counterclockwise load (positive), and a value of 1024-2047 gets translated into a clockwise load (negative). The results are written to hdynamixel -> _lastLoad, and hdynamixel -> _lastReadIsValid is set if the checksum is verified, and is cleared otherwise

Parameters
hdynamixelpointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor
Returns
None

Definition at line 869 of file DynamixelProtocolV1.c.

Here is the call graph for this function:

◆ Dynamixel_GetPosition()

void Dynamixel_GetPosition ( Dynamixel_HandleTypeDef hdynamixel)

Reads the angular position of the motor in degrees.

Reads addresses 0x24 and 0x25 in the motors RAM to see what the current position of the motor is. The results are written to hdynamixel -> _lastPosition, and hdynamixel -> _lastReadIsValid is set if the checksum is verified, and is cleared otherwise

Parameters
hdynamixelpointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor
Returns
None

Definition at line 799 of file DynamixelProtocolV1.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Dynamixel_GetTemperature()

uint8_t Dynamixel_GetTemperature ( Dynamixel_HandleTypeDef hdynamixel)

Reads the internal motor temperature.

Reads address 0x2B in the motor RAM to see what the current temperature is inside the motor. Results are in degrees Celsius

Parameters
hdynamixelpointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor
Returns
The internal motor temperature in degrees Celsius

Definition at line 921 of file DynamixelProtocolV1.c.

Here is the call graph for this function:

◆ Dynamixel_GetVelocity()

void Dynamixel_GetVelocity ( Dynamixel_HandleTypeDef hdynamixel)

Reads the angular velocity of the motor in RPM.

Reads addresses 0x26 and 0x27 in the motor RAM to see what the current velocity of the motor is. The results are written to hdynamixel -> _lastVelocity, and hdynamixel -> _lastReadIsValid is set if the checksum is verified, and is cleared otherwise

Parameters
hdynamixelpointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor
Returns
None

Definition at line 828 of file DynamixelProtocolV1.c.

Here is the call graph for this function:

◆ Dynamixel_GetVoltage()

float Dynamixel_GetVoltage ( Dynamixel_HandleTypeDef hdynamixel)

Reads the motor supply voltage.

Reads address 0x2A in the motor RAM to see what the current voltage is. The value retrieved from motor is 10 times the actual voltage. The results are written to hdynamixel -> _lastLoad, and hdynamixel -> _lastReadIsValid is set if the checksum is verified, and is cleared otherwise

Parameters
hdynamixelpointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor
Returns
The voltage in volts if the last read is valid, otherwise INFINITY

Definition at line 903 of file DynamixelProtocolV1.c.

Here is the call graph for this function:

◆ Dynamixel_Init()

void Dynamixel_Init ( Dynamixel_HandleTypeDef hdynamixel,
uint8_t  ID,
UART_HandleTypeDef *  UART_Handle,
GPIO_TypeDef *  DataDirPort,
uint16_t  DataDirPinNum,
enum motorTypes_e  motorType 
)

Initializes a motor handle.

Parameters
hdynamixelpointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor
IDthe ID the motor has. Note that this function will not set the ID in case there are multiple actuators on the same bus
UART_Handlethe handle to the UART that will be used to communicate with this motor
DataDirPortthe pointer to the port that the data direction pin for the motor is on
DataDirPinNumthe number corresponding to the pin that controls data direction (a power of two, e.g. 2^0 for pin 0, 2^15 for pin 15)
motorTypeindicates whether motor is AX12A or MX28
Returns
None

Definition at line 657 of file DynamixelProtocolV1_IO.c.

Here is the caller graph for this function:

◆ Dynamixel_IsJointMode()

bool Dynamixel_IsJointMode ( Dynamixel_HandleTypeDef hdynamixel)

Indicates whether the motor is operating in joint mode or wheel mode.

Reads the CW (addr: 0x06) and CCW (addr: 0x08) angle limits. If both are 0, motor is in wheel mode and can spin indefinitely. Otherwise, motor is in joint mode and has angle limits set

Parameters
hdynamixelpointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor
Returns
1 if in joint mode, 0 if in wheel mode

Definition at line 967 of file DynamixelProtocolV1.c.

Here is the call graph for this function:

◆ Dynamixel_IsMoving()

bool Dynamixel_IsMoving ( Dynamixel_HandleTypeDef hdynamixel)

Indicates whether the motor is in motion.

Reads the 0x2E address in motor RAM to see if motor is moving.

Parameters
hdynamixelpointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor
Returns
1 if moving, otherwise 0

Definition at line 951 of file DynamixelProtocolV1.c.

Here is the call graph for this function:

◆ Dynamixel_IsRegistered()

bool Dynamixel_IsRegistered ( Dynamixel_HandleTypeDef hdynamixel)

Used to tell if a command sent was written to motor registers.

Can also be used to see if the instruction in the motor register has been executed. If the ACTION command is executed, the value read is changed to 0

Read address: 0x2C

Default value: 0x00

Parameters
hdynamixelpointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor
Returns
1 if there are commands transmitted by REG_WRITE, 0 otherwise

Definition at line 939 of file DynamixelProtocolV1.c.

Here is the call graph for this function:

◆ Dynamixel_LEDEnable()

void Dynamixel_LEDEnable ( Dynamixel_HandleTypeDef hdynamixel,
uint8_t  isEnabled 
)

Toggles the motor LED.

Instruction register address: 0x19 (RAM)

     Default value: 0x00
Parameters
hdynamixelpointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor
isEnabled
  • if 1, LED is on
  • if 0, LED is off
Returns
None

Definition at line 551 of file DynamixelProtocolV1.c.

Here is the call graph for this function:

◆ Dynamixel_LockEEPROM()

void Dynamixel_LockEEPROM ( Dynamixel_HandleTypeDef hdynamixel)

Locks the EEPROM of the current motor until the next power cycle.

Instruction register address: 0x2F (RAM)

     Default value: 0x00
Parameters
hdynamixelpointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor
Returns
None

Definition at line 715 of file DynamixelProtocolV1.c.

Here is the call graph for this function:

◆ Dynamixel_Ping()

int8_t Dynamixel_Ping ( Dynamixel_HandleTypeDef hdynamixel)

Implementation of the PING instruction.

Used only for returning a status packet or checking the existence of a motor with a specified ID. Does not command any operations

Parameters
hdynamixelpointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor
Returns
The motor ID seen in status packet if received a valid status packet, otherwise the max uint8_t value

Definition at line 616 of file DynamixelProtocolV1_IO.c.

Here is the call graph for this function:

◆ Dynamixel_RegWrite()

void Dynamixel_RegWrite ( Dynamixel_HandleTypeDef hdynamixel,
uint8_t  arrSize,
uint8_t  writeAddr,
uint8_t  param1,
uint8_t  param2 
)

Implementation of the REG WRITE instruction with 2 parameters.

Parameters
hdynamixelpointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor
arrSizethe size of the array to be written (either 1 or 2)
writeAddrthe starting address for where the data is to be written
param1the first parameter
param2the second parameter
Returns
None

Definition at line 553 of file DynamixelProtocolV1_IO.c.

Here is the call graph for this function:

◆ Dynamixel_Reset()

void Dynamixel_Reset ( Dynamixel_HandleTypeDef hdynamixel)

Resets motor control table.

Resets the control table values of the motor to the Factory Default Value settings. Note that post-reset, motor ID will be 1. Thus, if several motors with ID 1 are connected on the same bus, there will not be a way to assign them unique IDs without first disconnecting them. Need to wait around 500 ms before motor becomes valid again

Parameters
hdynamixelpointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor
Returns
None

Definition at line 683 of file DynamixelProtocolV1_IO.c.

Here is the call graph for this function:

◆ Dynamixel_SetAlarmLED()

void Dynamixel_SetAlarmLED ( Dynamixel_HandleTypeDef hdynamixel,
uint8_t  alarm_LED_data 
)

Sets the conditions under which the motor LED will light up.

Register bits may be set simultaneously.

     Register address: 0x11 (EEPROM)

     Default value: 0x24 (0b00100100)
Parameters
hdynamixelpointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor
alarm_LED_datathe bits indicate the following:
  • bit 7: no function
  • bit 6: flash LED when an instruction error occurs
  • bit 5: flash LED when current load cannot be controlled with the specified maximum torque
  • bit 4: flash LED when the checksum of the transmitted packet is invalid
  • bit 3: flash LED when the command is given beyond the range of usage
  • bit 2: flash LED when the internal temperature exceeds the operating range
  • bit 1: flash LED when goal position exceeds the CW angle limit or CCW angle limit
  • bit 0: flash LED when applied voltage is out of operating range
Returns
None

Definition at line 477 of file DynamixelProtocolV1.c.

Here is the call graph for this function:

◆ Dynamixel_SetAlarmShutdown()

void Dynamixel_SetAlarmShutdown ( Dynamixel_HandleTypeDef hdynamixel,
uint8_t  alarm_shutdown_data 
)

Sets the conditions under which the motor will turn off its torque.

Register bits may be set simultaneously

     Register address: 0x12 (EEPROM)

     Default value: 0x24 (0b00100100)
Parameters
hdynamixelpointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor
alarm_shutdown_datathe bits indicate the following:
  • bit 7: no function
  • bit 6: torque off when an instruction error occurs
  • bit 5: torque off when current load cannot be controlled with the specified maximum torque
  • bit 4: torque off when the checksum of the transmitted packet is invalid
  • bit 3: torque off when the command is given beyond the range of usage
  • bit 2: torque off when the internal temperature exceeds the operating range
  • bit 1: torque off when goal position exceeds the CW angle limit or CCW angle limit
  • bit 0: torque off when applied voltage is out of operating range
Returns
None

Definition at line 509 of file DynamixelProtocolV1.c.

Here is the call graph for this function:

◆ Dynamixel_SetBaudRate()

void Dynamixel_SetBaudRate ( Dynamixel_HandleTypeDef hdynamixel,
uint32_t  baud 
)

Sets the baud rate of a particular motor.

Register address is 0x04 in motor EEPROM

     Instruction register address: 0x04 (EEPROM)

     Default value: 0x01
Parameters
hdynamixelpointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor
baudthe baud rate. Arguments in range [7844, 1000000] are valid
Returns
None

Definition at line 169 of file DynamixelProtocolV1.c.

Here is the call graph for this function:

◆ Dynamixel_SetCCWAngleLimit()

void Dynamixel_SetCCWAngleLimit ( Dynamixel_HandleTypeDef hdynamixel,
float  maxAngle 
)

Sets the counter-clockwise angle limit for the current motor.

If maxAngle for CCW angle limit is 0 AND minAngle for CW angle limit is 0, then motor is in wheel mode where it can continuously rotate. Otherwise, motor is in joint mode where its motion is constrained between the set bounds.

Register 0x08 in EEPROM for low byte, 0x09 in EEPROM for high byte

Instruction register address: 0x08 (EEPROM)

Default value: 0x03FF

Parameters
hdynamixelpointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor
maxAnglethe maximum angle for all motor operations. Arguments between 0 and 300 are valid
Returns
None

Definition at line 303 of file DynamixelProtocolV1.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Dynamixel_SetCWAngleLimit()

void Dynamixel_SetCWAngleLimit ( Dynamixel_HandleTypeDef hdynamixel,
float  minAngle 
)

Sets the clockwise angle limit for the current motor.

If maxAngle for CCW angle limit is 0 AND minAngle for CW angle limit is 0, then motor is in wheel mode where it can continuously rotate. Otherwise, motor is in joint mode where its motion is constrained between the set bounds.

Register 0x06 in EEPROM for low byte, 0x07 in EEPROM for high byte

Instruction register address: 0x06 (EEPROM)

Default value: 0x0000

Parameters
hdynamixelpointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor
minAnglethe minimum angle for all motor operations. Arguments between 0 and 300 are valid
Returns
None

Definition at line 261 of file DynamixelProtocolV1.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Dynamixel_SetGoalPosition()

void Dynamixel_SetGoalPosition ( Dynamixel_HandleTypeDef hdynamixel,
float  goalAngle 
)

Sets the goal position of the motor in RAM.

Takes a double between 0 and 300, encodes this position in an upper and low hex byte pair (with a maximum of 1023 as defined in the AX-12 user manual), and sends this information (along with requisites) over UART. Low byte is 0x1E in motor RAM, high byte is 0x1F in motor RAM.

Instruction register address: 0x1E (RAM)

Default value: None

Parameters
hdynamixelpointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor
goalAnglethe desired angular position. Arguments between 0 and 300 are valid. Note that 150 corresponds to the middle position
Returns
None

Definition at line 579 of file DynamixelProtocolV1.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Dynamixel_SetGoalTorque()

void Dynamixel_SetGoalTorque ( Dynamixel_HandleTypeDef hdynamixel,
float  goalTorque 
)

Sets the torque limit for the motor in RAM.

The initial value is taken from 0x0E and 0x0F (max torque in EEPROM)

Low byte is 0x22 in motor RAM, high byte is 0x23 in motor RAM.

Instruction register address: 0x22 (RAM)

Default value: ADDR14 (low byte) and ADDR15 (high byte)

Parameters
hdynamixelpointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor
goalTorquethe percentage of the maximum possible torque (max: 100). Gets converted into a 10-bit number
Returns
None

Definition at line 694 of file DynamixelProtocolV1.c.

Here is the call graph for this function:

◆ Dynamixel_SetGoalVelocity()

void Dynamixel_SetGoalVelocity ( Dynamixel_HandleTypeDef hdynamixel,
float  goalVelocity 
)

Sets the goal velocity of the motor in RAM.

Low byte is 0x20 in motor RAM, high byte is 0x21 in motor RAM

     Instruction register address: 0x20 (RAM)

     Default value: None
Parameters
hdynamixelpointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor
goalVelocitythe goal velocity in RPM. Arguments of 0-114 are valid when in joint mode. 0 corresponds to MAX motion in joint mode, and minimum motion in wheel mode. In wheel mode, negative arguments correspond to CW rotation
Returns
None

Definition at line 626 of file DynamixelProtocolV1.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Dynamixel_SetHighestVoltageLimit()

void Dynamixel_SetHighestVoltageLimit ( Dynamixel_HandleTypeDef hdynamixel,
float  highestVoltage 
)

Sets the highest operating voltage limit for the current motor.

Instruction register address: 0x0C (EEPROM)

     Default value: 140 (0xBE)
Parameters
hdynamixelpointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor
highestVoltagethe highest operating voltage in volts
Returns
None

Definition at line 345 of file DynamixelProtocolV1.c.

Here is the call graph for this function:

◆ Dynamixel_SetID()

void Dynamixel_SetID ( Dynamixel_HandleTypeDef hdynamixel,
uint8_t  ID 
)

Sets the ID (identification number) for the current motor.

Note that the instruction will be broadcasted using the current ID. As such, if the ID is not known, the motor ID should be initialized to the broadcast ID (0xFE) in the Dynamixel_Init function

Instruction register address: 0x03 (EEPROM) Default value: 1

Parameters
hdynamixelpointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor
IDthe number between 0 and 252 or equal to 254 to identify the motor. If 0xFE (254), any messages broadcasted to that ID will be broadcasted to all motors
Returns
None

Definition at line 143 of file DynamixelProtocolV1.c.

Here is the call graph for this function:

◆ Dynamixel_SetLowestVoltageLimit()

void Dynamixel_SetLowestVoltageLimit ( Dynamixel_HandleTypeDef hdynamixel,
float  lowestVoltage 
)

Sets the lowest operating voltage limit for the current motor.

Instruction register address: 0x0D (EEPROM)

     Default value: 60 (0x3C)
Parameters
hdynamixelpointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor
lowestVoltagethe lowest operating voltage in volts
Returns
None

Definition at line 377 of file DynamixelProtocolV1.c.

Here is the call graph for this function:

◆ Dynamixel_SetMaxTorque()

void Dynamixel_SetMaxTorque ( Dynamixel_HandleTypeDef hdynamixel,
float  maxTorque 
)

Sets the maximum torque limit for all motor operations.

Low byte is addr 0x0E in motor RAM, high byte is addr 0x0F in motor RAM

Register address: 0x0E (EEPROM)

Default value: 0x3FF

Parameters
hdynamixelpointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor
maxTorquethe maximum torque as a percentage (max: 100). Gets converted to 10-bit number
Returns
None

Definition at line 408 of file DynamixelProtocolV1.c.

Here is the call graph for this function:

◆ Dynamixel_SetPunch()

void Dynamixel_SetPunch ( Dynamixel_HandleTypeDef hdynamixel,
float  punch 
)

Sets a quantity proportional to the minimum current supplied to the motor during operation.

Units are not specified in the datasheet, and therefore this function is not entirely useful without sufficient testing

Low byte at address 0x30 and high byte at address 0x31

Instruction register address: 0x30

Default value: 0x0020 (maximum: 0x3FF)

Parameters
hdynamixelpointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor
punchfor now, arguments in range [0, 1023] are valid
Returns
None

Definition at line 737 of file DynamixelProtocolV1.c.

Here is the call graph for this function:

◆ Dynamixel_SetReturnDelayTime()

void Dynamixel_SetReturnDelayTime ( Dynamixel_HandleTypeDef hdynamixel,
uint16_t  microSec 
)

Sets the time, in microseconds, that the motor should wait before returning a status packet.

Instruction register address: 0x05(EEPROM)

     Default value: 250 (0xFA)
Parameters
hdynamixelpointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor
microSecthe time in microseconds to delay. Arguments in range [2, 508] are valid. Default: 500
Returns
None

Definition at line 228 of file DynamixelProtocolV1.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Dynamixel_SetStatusReturnLevel()

void Dynamixel_SetStatusReturnLevel ( Dynamixel_HandleTypeDef hdynamixel,
uint8_t  status_data 
)

Sets the conditions under which a status packet will be returned.

Register address: 0x10 (EEPROM)

     Default value: 0x02
Parameters
hdynamixelpointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor
status_data
  • 0 to return only on ping
  • 1 to return only for reads
  • 2 to return for all commands
Returns
None

Definition at line 440 of file DynamixelProtocolV1.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Dynamixel_TorqueEnable()

void Dynamixel_TorqueEnable ( Dynamixel_HandleTypeDef hdynamixel,
uint8_t  isEnabled 
)

Enables or disables torque for current motor.

Instruction register address: 0x18 (RAM)

     Default value: 0x00
Parameters
hdynamixelpointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor
isEnabled
  • if 1, then generates torque by impressing power to the motor
  • if 0, then interrupts power to the motor to prevent it from generating torque
Returns
None

Definition at line 528 of file DynamixelProtocolV1.c.

Here is the call graph for this function:
Here is the caller graph for this function: