CodeUC HRI2 v2.0 Microcontroller firmware of the board used during the HRI labs.

- Main Page
- Modules
- Data Structures
- Files

Functions
Driver / ESCON drive

Driver for the maxon ESCON motor controller. More...

## Functions
void | esc_Init (void)
| Intializes the driver. Initializes the driver, and set the motor torque to zero. More...
void | esc_SetTorque (float32_t torque)
| Sets the motor torque. More...

## Detailed Description

Driver for the maxon ESCON motor controller.

This driver controls the torque of a motor driven by a maxon ESCON controller. The ESCON and the HRI board should be connected as follow:

- ESCON AnIN1+ to HRI board ANOUT1.
- ESCON AnIN1- to HRI board GND.
- ESCON AnIN1- to ESCON GND. This driver uses the DAC1 peripheral.

First, call dac_Init() to initialize the DAC. Then, in the initialization code, call esc_Init() once. Finally, esc_SetTorque() can be called to set the motor torque.

Note
  The constants are set for a maxon EC-max 30mm 24V, so they should be changed if another motor is used instead.

## Function Documentation

void esc_Init | ( | void |  | ) |

Intializes the driver. Initializes the driver, and set the motor torque to zero.

void esc_SetTorque | ( | float32_t | torque | ) |

Sets the motor torque.

Parameters

  torque | the torque to set [N.m]. If larger than the nominal torque, it will be saturated to the nominal torque.