# EtherCAT Device Control
A command line utility to control Ethercat devices.
## Functions
### Setstate
Set the EtherCAT state of devices.
**Example**
Set the EtherCAT device with EtherCAT addresse `1001` on EtherCAT Master with AmsNetId `172.57.56.160.2.1`to state `PreOp`.
```bash
.\ethercat-device-control.exe 172.17.56.160.2.1 1001 setstate preop
```
### FwUpdate
Perform an firmware update.
**Example**
Load the local firmware file `C:\TwinCAT\Functions\TE5950-Drive-Manager-2\Firmware\AX8000 AMP8000\AX8620-0000_v01.03_b0009_0103.efw` on the device with the EtherCAT address `1001` on EtherCAT Master with AmsNetId `172.57.56.160.2.1`.
```bash
.\ethercat-device-control.exe 172.17.56.160.2.1 1001 warn fwupdate "C:\TwinCAT\Functions\TE5950-Drive-Manager-2\Firmware\AX8000 AMP8000\AX8620-0000_v01.03_b0009_0103.efw"
```