Firmware update for motor control drives#
Updates a single EtherCAT actuator at a given slave position. The script resets the target slave into bootloader mode and can perform one or both of the following operations in the same bootloader session, depending on the arguments provided:
Firmware only: pass
--cpu1-hexand--cm-hexto upload the corresponding core firmware files.Environment only: pass
--env-fileto upload a new environment without touching the firmware.Firmware and environment: pass both firmware hex files and an environment file to update everything in one shot. The environment is written right after the firmware cores have been uploaded.
If none of --cpu1-hex, --cm-hex or --env-file is provided, the script exits with an error since there is nothing to do.
Pre-execution steps:
Before running this script you must release the EtherCAT interface and run the
command as root. Follow these steps in order:
Stop the module manager and the EtherCAT service so the NIC is freed:
pal module_manager stop sudo systemctl stop ethercat.service
Verify that the interface is now available under the name
ethercat0:ip aIf the interface appears as
DOWN, bring it up:sudo ip link set ethercat0 up
The script requires root privileges, so switch to a root shell before launching it:
sudo su
Usage:
ros2 run ethercat_loader update_single_actuator <slave_position> [OPTIONS]
Arguments:
Argument |
Default |
Description |
|---|---|---|
|
(required) |
Slave position in the EtherCAT chain |
|
|
EtherCAT interface name |
|
|
Path to the cpu1 |
|
|
Path to the cm |
|
|
Path to the environment file. If omitted, the environment is not updated. |
Post-execution steps:
Once the update has finished:
Power off the actuator.
Restart the EtherCAT service and the module manager so the system goes back to its normal operating state:
sudo systemctl start ethercat.service pal module_manager start