eeros_architecture:control_system:available_blocks:canopensend
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
eeros_architecture:control_system:available_blocks:canopensend [2024/05/27 17:06] – created ursgraf | eeros_architecture:control_system:available_blocks:canopensend [2024/05/30 17:13] (current) – ursgraf | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== CANopen Send ====== | ====== CANopen Send ====== | ||
- | This block sends PDO packets over a CAN bus to a Faulhaber drive. The drive itself must be initialized by SDO transfers | + | This block sends PDO packets over a CAN bus to one or several drives. The drives |
- | [{{ : | + | [{{ : |
- | The block for sending will periodically (given by its time domain) send a '' | + | The block for sending will periodically (given by its time domain) send a '' |
- | Each time the block is run by its time domain, a '' | + | ===== Data Transfer ===== |
+ | Each time the block is run by its time domain, a '' | ||
+ | [{{ : | ||
+ | Each drive has its own node id and its specific input index (0 to N-1). After the block has been created you have to configure the PDOs which are sent to each drive. While doing this you must specify which of the signal inputs (floating point or fixed point) get included into which PDO. Both signals | ||
<code cpp> | <code cpp> | ||
- | setCtrl(Matrix< | + | configureRPDO(uint8_t nodeId, uint8_t RPDOnr, std:: |
</ | </ | ||
- | the velocity | + | includes a vector of all CANopen objects which are mapped into this RPDO together with a corresponding vector of indices. These indices determine which signal |
- | The velocity input expects a signal | + | How could this be used? Let us assume, that the drive with node id = 37 should receive |
<code cpp> | <code cpp> | ||
- | setVelScale(Matrix< | + | configureRPDO(37, RPDO1, {controlObj, |
+ | configureRPDO(37, RPDO2, {digOutStateObj}, | ||
</ | </ | ||
- | This blocks uses the [[http://github.com/ntb-ch/ | + | |
+ | The control word has no input but can be set by the method | ||
+ | <code cpp> | ||
+ | setCtrl(uint8_t index, uint16_t ctrl> | ||
+ | </ | ||
+ | |||
+ | The floating point input signals expect signals in SI units, e.g. rad/s. To account for encoder resolution of the actual drive together with a gearbox, it is possible to set a scaling factor with | ||
+ | <code cpp> | ||
+ | setScale(Matrix< | ||
+ | </ | ||
+ | |||
+ | This blocks uses the [[https://gitlab.ost.ch/ |
eeros_architecture/control_system/available_blocks/canopensend.1716822368.txt.gz · Last modified: 2024/05/27 17:06 by ursgraf