The following sections describe the steps to configure a project the contains one PLC that implements EtherCAT Master and the SITARA AM64x based EtherCAT slave device.
In the setup described in the diagram below, a CODESYS (https://www.codesys.com/) IEC 61131 development and runtime system is used with a industrial RevPi Connect hardware (https://revolution.kunbus.com/) by KUNBUS GmbH.
The CODESYS development system is after registration available for download free of charge from the CODESYS Store.
Please consult the system requirements in the CODESYS Store for the development PC.
It is recommended to install the full package. For the CODESYS runtime on the KUNBUS RevPi hardware, the CODESYS Control for Raspberry Pi MC SL is required.
Without a valid license, the CODESYS runtime including the fieldbus functionality will execute for one hour and then exit.
To install the runtime package the CODESYS development system must be started with administrative rights.
Installation is performed from within the CODESYS Package Manager. It is recommended to install the multi-core version.
After the package is installed, the CODESYS runtime system has to be installed on the RevPi hardware. From the menu system select Tools → Update Raspberry Pi
Start the CODESYS development system and create a new standard project
Select CODESYS Control for Raspberry Pi MC SL (3S - Smart Software Solutions GmbH) as device and the programming language of your choice.
The development system creates the project structure and populates the structure of the device tree.
Before configuring the EtherCAT network, the matching device description file has to be installed to the CODESYS device repository.
Navigate to Tools → Device Repository in the menu system and install the file TI AM64X.R5F Simple.xml
which is part of the distribution.
Scan for a Gateway Device and select connected RevPi.
Continue to add and EtherCAT Master.
Select the MAC Address of the Ethernet Interface used by EtherCAT Network Communication.
Once complete you can enter Online mode and start your application.
This only starts the EtherCAT Master from where it is possible to scan for connected Slave devices.
Provided device description has been installed earlier, the scan process will identify the EtherCAT Slave device which can now be copied to the project.
Exit Online mode, re-enter Online mode to download the new project structure, and start the application.
Open the Device General Settings tab and select the Expert settings
.
Navigate to the "Expert Process Data" tab, which will be displayed after Expert settings
is selected, and select "Load PDO Info from Device"
Finally exit Online mode, re-enter Online mode to download the new project structure, and start the application.
All devices should now be running.
Now you are free can implement your program.