eeros_architecture:control_system:available_blocks:canopensend
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
eeros_architecture:control_system:available_blocks:canopensend [2024/05/30 16:55] – ursgraf | eeros_architecture:control_system:available_blocks:canopensend [2024/05/30 17:13] (current) – ursgraf | ||
---|---|---|---|
Line 8: | Line 8: | ||
===== Data Transfer ===== | ===== Data Transfer ===== | ||
Each time the block is run by its time domain, a '' | Each time the block is run by its time domain, a '' | ||
- | [{{ : | + | [{{ : |
- | 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. The method | + | 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 can be vectors. The method |
<code cpp> | <code cpp> | ||
configureRPDO(uint8_t nodeId, uint8_t RPDOnr, std:: | configureRPDO(uint8_t nodeId, uint8_t RPDOnr, std:: | ||
</ | </ | ||
- | 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 is taken for this RPDO. To give an example: idx=1 takes the floating point signal at index 1, idx=1 takes the floating point signal at index 1 | + | 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 is taken for this RPDO. To give an example: idx=1 takes the floating point signal at index 0, idx=2 takes the floating point signal at index 1, idx=0 takes the control word and idx=-1 takes the integer signal at index 0. |
+ | How could this be used? Let us assume, that the drive with node id = 37 should receive a RPDO1 with control word and velocity setpoint and RPDO2 with digital output word (steering some enable pins or leds). Let's further assume that the floating point input signal is a vector consisting of position setpoint and velocity setpoint. The configuration would then be | ||
+ | <code cpp> | ||
+ | configureRPDO(37, | ||
+ | configureRPDO(37, | ||
+ | </ | ||
- | and RPDO2 (velocity). While the control word can be set by the method | + | The control word has no input but can be set by the method |
<code cpp> | <code cpp> | ||
- | setCtrl(Matrix< | + | setCtrl(uint8_t index, uint16_t |
</ | </ | ||
- | the velocity is taken from its input '' | + | |
- | The velocity | + | The floating point input signals expect signals |
<code cpp> | <code cpp> | ||
- | setVelScale(Matrix<nofNodes,1, | + | setScale(Matrix<N,M, |
</ | </ | ||
+ | |||
This blocks uses the [[https:// | This blocks uses the [[https:// |
eeros_architecture/control_system/available_blocks/canopensend.1717080910.txt.gz · Last modified: 2024/05/30 16:55 by ursgraf