Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • EtherCAT Resources & Reference Material
  • linuxRT PC Set-up
  • Configuring the $IOC/vioc-<>-<> Directory
  • EtherCAT linuxRT Configuration
  • EtherCAT Template for Creating Epics Application
  • Configuring EtherCAT Epics Application
  • Configuring the $IOC/vioc-<>-<> Directory
  • Debugging Tips

 

EtherCAT Resources & Reference Material

...

  • Another helpful ethercat command line took is ethercat master


Configuring the $IOC/vioc-<>-<> Directory


EtherCAT Template for Creating Epics Application

...

You have now created a baseline EtherCAT application.

(For more reference material on getting started with EPICS: CH. 2 Getting Started)

 

Configuring EtherCAT Epics Application

...

Before being able to successfully run the application, some clean-up and configuration are necessary in the following areas:

  1. <top>/etc/
  2. <top>/<app_name>/Db/Makefile
  3. <top>/iocBoot/vioc-<>-<>/st.cmd

The first step specific to an EtherCAT application, is creating a chain.xml file for the scanner process.  The scanner process will open up a unix socket for communication with the IOC.  If using the slac_ethercat template, you should already have a directory named etc under <top>.  Otherwise, you will been to create a directory called etc.  This directory will consist of a Makefile, chain.xml, and a scanner.xml.  The scanner.xml will be automatically generated upon building the application. 

The Makefile should consist of the following lines:

TOP=..                                                                   


include $(TOP)/configure/CONFIG


install:

    /usr/bin/python $(ECASYN)/etc/scripts/expandChain.py  chain.xml > scanner.xml


clean:

    rm -f scanner.xml

    rm -f EK1101-EtherCAT.template

distclean: clean

realclean: clean

uninstall:

 

However, the chain.xml needs to be manually created based off the devices in your chain.  You should first verify that your device is supported in the EtherCAT Module (check that your device as

This directory will cons

To setup the scanner, chain.xml file is to be created.

...

  1. To obtain the revision number for the device use the slaves etherlab ethercat command line tool.

    $ ethercat slaves -v -p0

    === Master 0, Slave 0 ===

    Device: Main

    State: OP

    Flag: +

    Identity:

      Vendor Id:       0x4c4e5449

      Product code:    0x009606e3

      Revision number: 0x00010007

      Serial number:   0x1bd200e7

  2. Generate the scanner.xml file using the script - expandChain.py present under /etc/scripts

...