This guide is a quick reference on how to create an ENI file for usage in Simulink.
See also: Configure EtherCAT Network by Using TwinCAT 3 for the full documentation on this.
Here, we just provide a quick overview.
If everything is connected, and all devices are active in your EtherCAT network (see EtherCAT configurator), we can actually export the ENI file. This file descibes how the network is setup (in which order, which devices, etc) so that we can use that description for actually running a program on our EtherCAT system (EtherCAT Overview).
Useful links:
Mathworks tutorial
Remember to connect it back to the xPC after the configuration is completed
I/O
devices, Click Scan...
Create the task:
Task 1
is fine)Task 1
node, and set Cycle Ticks to
1
to set the update rate to 1000Hz2
to set the update rate to 500HzSet the task inputs:
Task 1
(It probably doesn’t matter which one, as long as you select one)Task 1
, and click Linked To. Select the ActualPosition node under Box 1. (This should be the same address as the node dragged in the previous step).Set the task outputs:
Task 1
, and click Linked To. Select the Motion Command Par 1 node under Box 1. (This should be the same address as the node dragged in the previous step).I/O/Devices/Device #
EtherCAT
tab. From here you can click Topology
to double check if everything is connected as intended.Export Configuration File...
.