A.Quarter.To.Seven

Some of Stef's Stuff

CODESYS on Raspberry Pi and EtherCAT

by Stefano on 2016.04.09, 2 comments

Want create site? Find Free WordPress Themes and plugins.

Setup of CODESYS soft-PLC for an industrial automation setup with an EtherCAT master running on Raspberry Pi.

Setup Raspberry PI

You need a Raspberry PI with Raspbian up and running. If not, download the Raspbian image and install it on an SD card following the official installation guide

You should be able to connect to your PI and, if on a Raspberry PI 3, you should have the onboard WiFi set up so it can be used for the CODESYS – Raspberry PI communication while the wired LAN will be used for the connection to the EtherCAT slave. See:

NOTE

Setup CODESYS and Raspberry Pi device

 

CODESYS configuration and the device description files

The CODESYS runtime can be configured to run as the master in an EtherCAT network. To interact with the devices connected on the network the EtherCAT master must know their details. This is achieved by adding the devices to the CODESYS project device tree via their descriptor files. Some “slaves” are alread know by CODEYS, as they’re distributed with the software, but in general the desciptor file for a particular device (or a family of them) is provided by the manufacturer in the form of an XML file that can be imported in CODESYS

The list of the device known by CODESYS can be accessed from Tools > Device Manager

Screen Shot 2016-04-11 at 01.02.52

 

Beckhoff EtherCAT coupler and IO modules

  • Beckhoff EK1100 EtherCAT Coupler
  • Beckhoff EL1008 – 8x Digital Input
  • Beckhoff EL2008 – 8x Digital Output

The XML description files of the EtherCAT modules from Beckhoff EK1100 webpage (select XML device description from the tree on the left and then right click and Save link as… on the archive file – around 15MB ).

The archive contains the descriptors for all the Beckhoff hardware including EKxxxx, EL1xxx and EK2xxx.

Screen Shot 2016-04-10 at 13.05.36

 

Bonfiglioli ACU drive with EtherCAT interface

The ACU frequency inverters from Bonfiglioli can be connected to an EtherCAT network using the communication module CM-EtherCAT

 

Wago EtherCAT coupler

 

 

EtherCAT advanced topics

Distributed Clocks (DCs)

 

Did you find apk for android? You can find new Free Android Games and apps.

2 thoughts on “CODESYS on Raspberry Pi and EtherCAT

  1. I am trying to implement Ethercat Master on Pi3 and my desired slave description is not included in the codesys database.But I have xml file description of my device. How can I import xml file in the codesys while configuring master ?

    • Hi Ans,
      assuming you’re in CODESYS 3.5, go to the menu “Tools > Device Repository…” and click on the “Install…” button. Select the XML file containing the description of your device and it will be added to the database.

      Hope this helps.

Leave a Reply

Your email address will not be published. Required fields are marked *