Tool Libs
UMIT-TIROL Institute of Automation and Control Engineering library collection
 
Loading...
Searching...
No Matches
mcDSA Struct Referenceabstract

Driver for the mcDSA-B60 CANOpen Motor driver. More...

#include <mcDSA.h>

Inherits CAN::Open::Device.

Collaboration diagram for mcDSA:
[legend]

Public Member Functions

void enable (bool en=true)
 Enable or Disable the motor driver.
 
void speed (double speed)
 Set the motor speed in u/min.
 
void readData ()
 Read current motor data.
 
double current ()
 Return the current motor current in mA.
 
void callback (CAN::Open::SDO rq)
 implement the callback method to handle incoming data
 
void callback (CAN::Open::TPDO rq)
 implement the callback method to handle incoming data
 
void read (uint16_t ix, uint8_t sub)
 read DO with given index and subindex of this device
 
void w8 (uint16_t ix, uint8_t sub, uint8_t val)
 write given value to DO at given index and subindex
 
void w16 (uint16_t ix, uint8_t sub, uint16_t val)
 write given value to DO at given index and subindex
 
void w32 (uint16_t ix, uint8_t sub, uint32_t val)
 write given value to DO at given index and subindex
 
void wPDO (const RPDO &rpdo)
 send PDO
 
void enablePDO (RPDO &pdo)
 enable receiving PDO on device
 
void enablePDO (TPDO &pdo)
 enable sending PDO on device
 
void disablePDO (RPDO &pdo)
 disable receiving PDO on device
 
void disablePDO (TPDO &pdo)
 disable sending PDO on device
 
bool full () override
 check if sink is full
 
virtual void push (const TPDO &t)
 copy semantics does not check for space. guard by using 'if (!full) { ... }'
 
virtual void push (TPDO &&)=0
 move semantics does not check for space. guard by using 'if (!full) { ... }'
 
virtual void push (const SDO &t)
 copy semantics does not check for space. guard by using 'if (!full) { ... }'
 
virtual void push (SDO &&)=0
 move semantics does not check for space. guard by using 'if (!full) { ... }'
 
void trypush (TPDO &&t)
 use this if you don't care if it's going to be successful. data gets discarded if sink is full.
 
void trypush (SDO &&t)
 use this if you don't care if it's going to be successful. data gets discarded if sink is full.
 

Public Attributes

uint8_t const id {}
 CANOpen node ID [1 - 127].
 

Detailed Description

Driver for the mcDSA-B60 CANOpen Motor driver.

Member Function Documentation

◆ speed()

void mcDSA::speed ( double  speed)
inline

Set the motor speed in u/min.

Only works if device is in Operational State Capped at +- 1m/s

◆ readData()

void mcDSA::readData ( )
inline

Read current motor data.

Includes actual speed, desired speed, motor current, motor position (angle), motor error.


The documentation for this struct was generated from the following file: