User Tools

Site Tools


eeros_architecture:control_system:available_blocks:canopenreceive

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
eeros_architecture:control_system:available_blocks:canopenreceive [2024/05/30 17:29] ursgrafeeros_architecture:control_system:available_blocks:canopenreceive [2024/05/30 17:37] (current) ursgraf
Line 8: Line 8:
 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  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::vector<coObject_t> objs, std::vector<int8_t> idx)) +configureTPDO(uint8_t nodeId, uint8_t TPDOnr, std::vector<coObject_t> objs, std::vector<int8_t> idx)) 
 </code>  </code> 
-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. +includes a vector of all CANopen objects which are mapped into this TPDO together with a corresponding vector of indices. These indices determine which signal is written to the output for this TPDO. To give an example: idx=1 writes the floating point signal at index 0, idx=2 writes the floating point signal at index 1, idx=0 writes to the status word and idx=-1 writes 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 +How could this be used? Let us assume, that the drive with node id = 37 sends TPDO1 with status word and actual position and TPDO2 carries a digital input word (reading some buttonsand actual velocity. Let's further assume that the floating point input signal is a vector consisting of position and velocity values. The configuration would then be 
 <code cpp> <code cpp>
-configureRPDO(37, RPDO1, {controlObjvelModeSetValObj}, {0,1}); +configureTPDO(37, TPDO1, {statusObjposActValObj}, {0,1}); 
-configureRPDO(37, RPDO2, {digOutStateObj}, {-1});+configureTPDO(37, TPDO2, {digInStateObj,velActValObj}, {-1,2});
 </code>  </code> 
  
-The control word has no input but can be set by the method+The status word has no output but can be read by the method
 <code cpp> <code cpp>
-setCtrl(uint8_t index, uint16_t ctrl>);+getStatus(uint8_t index);
 </code>  </code> 
  
-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+The floating point output signals should be 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> <code cpp>
 setScale(Matrix<N,M,double>); setScale(Matrix<N,M,double>);
eeros_architecture/control_system/available_blocks/canopenreceive.1717082944.txt.gz · Last modified: 2024/05/30 17:29 by ursgraf