Hello,
Except I did something wrong, I don't think it is possible to have a configuration with 2 (or more) CiA402 Drives on the same EtherCAT Slave, following the CiA402 SubDevice definition : https://software-dl.ti.com/processor-industrial-sw/esd/ind_comms_sdk/am243x/11_00_00_08/docs/am243x/ethercat_subdevice/example2.html.
Here below a part of configuration I would like to have (Xacro & YAML with 2 axis) :
multidrive.xacro
<?xml version="1.0"?>
<robot xmlns:xacro="http://www.ros.org/wiki/xacro">
<xacro:macro name="ec_multiple_axis" params="joint_name module_name position alias">
<joint name="${joint_name}">
<state_interface name="status_word"/>
<state_interface name="position"/>
<state_interface name="velocity"/>
<state_interface name="mode_of_operation"/>
<command_interface name="control_word"/>
<command_interface name="position"/>
<command_interface name="velocity"/>
<command_interface name="mode_of_operation"/>
<ec_module name="${module_name}">
<plugin>ethercat_generic_plugins/EcCiA402Drive</plugin>
<param name="alias">${alias}</param>
<param name="position">${position}</param>
<param name="slave_config">config_cia402.yaml</param>
</ec_module>
</joint>
</xacro:macro>
</robot>
config_cia402.yaml
rpdo: # RxPDO = receive PDO Mapping
- index: 0x1600
channels: # Axis 1
- { index: 0x6040, sub_index: 0, type: uint16, default: 0, command_interface: control_word } # Control word
- { index: 0x607a, sub_index: 0, type: int32, command_interface: position, default: .nan} # Target position
- { index: 0x60ff, sub_index: 0, type: int32, command_interface: velocity, default: 0 } # Target velocity
- { index: 0x6060, sub_index: 0, type: int16, command_interface: mode_of_operation, default: 8 } # Mode of operation
- index: 0x1610
channels: # Axis 2
- { index: 0x6840, sub_index: 0, type: uint16, default: 0, command_interface: control_word } # Control word
- { index: 0x687a, sub_index: 0, type: int32, command_interface: position, default: .nan } # Target position
- { index: 0x68ff, sub_index: 0, type: int32, command_interface: velocity, default: 0 } # Target velocity
- { index: 0x6860, sub_index: 0, type: int16, command_interface: mode_of_operation, default: 8 } # Mode of operation
tpdo: # TxPDO = transmit PDO Mapping
- index: 0x1a00
channels: # Axis 1
- { index: 0x6041, sub_index: 0, type: uint16, state_interface: status_word } # Status word
- { index: 0x6064, sub_index: 0, type: int32, state_interface: position} # Position actual value
- { index: 0x606c, sub_index: 0, type: int32, state_interface: velocity } # Velocity actual value
- { index: 0x6061, sub_index: 0, type: int16, state_interface: mode_of_operation } # Mode of operation display
- index: 0x1a10
channels: # Axis 2
- { index: 0x6841, sub_index: 0, type: uint16, state_interface: status_word } # Status word
- { index: 0x6864, sub_index: 0, type: int32, state_interface: position } # Position actual value
- { index: 0x686c, sub_index: 0, type: int32, state_interface: velocity } # Velocity actual value
- { index: 0x6861, sub_index: 0, type: int16, state_interface: mode_of_operation } # Mode of operation display
is it possible to create a PR for that ?
Thanks !
Hello,
Except I did something wrong, I don't think it is possible to have a configuration with 2 (or more) CiA402 Drives on the same EtherCAT Slave, following the CiA402 SubDevice definition : https://software-dl.ti.com/processor-industrial-sw/esd/ind_comms_sdk/am243x/11_00_00_08/docs/am243x/ethercat_subdevice/example2.html.
Here below a part of configuration I would like to have (Xacro & YAML with 2 axis) :
multidrive.xacroconfig_cia402.yamlis it possible to create a PR for that ?
Thanks !