The use of EtherCAT with EPICS at Diamond Ronaldo Mercado - - PowerPoint PPT Presentation

the use of ethercat
SMART_READER_LITE
LIVE PREVIEW

The use of EtherCAT with EPICS at Diamond Ronaldo Mercado - - PowerPoint PPT Presentation

The use of EtherCAT with EPICS at Diamond Ronaldo Mercado 22/10/2014 EPICS Collaboration Meeting, CEA, Saclay, Oct 2014 Contents EtherCAT Diamond setup Hardware EPICS driver Recent work and work in-progress Screenshots


slide-1
SLIDE 1

EPICS Collaboration Meeting, CEA, Saclay, Oct 2014

The use of EtherCAT with EPICS at Diamond

Ronaldo Mercado 22/10/2014

slide-2
SLIDE 2

EPICS Collaboration Meeting, CEA, Saclay, Oct 2014

Contents

  • EtherCAT
  • Diamond setup

– Hardware – EPICS driver

  • Recent work and work in-progress

– Screenshots from actual setup

slide-3
SLIDE 3

EPICS Collaboration Meeting, CEA, Saclay, Oct 2014

  • Why EtherCAT?
  • How does it work?

– EtherCAT master startup of LRW cycle

EtherCAT

slide-4
SLIDE 4

EPICS Collaboration Meeting, CEA, Saclay, Oct 2014

  • Open protocol, uses standard Ethernet hardware
  • Uses standard Ethernet cable and connectors. Can use standard

switches and routers. DLS uses separate cabling - fieldbus.

  • Available Linux open source master.
  • Faster than most other fieldbuses.

Why EtherCAT?

slide-5
SLIDE 5

EPICS Collaboration Meeting, CEA, Saclay, Oct 2014

  • IEC 61138 (Type 12)

EtherCAT frame structure

slide-6
SLIDE 6

EPICS Collaboration Meeting, CEA, Saclay, Oct 2014

EtherCAT: Principle of operation

  • Master – slave communications with a

periodic scan cycle

  • All operations in hardware, using an

FPGA or an ASIC

  • Global addressing
  • Messages processed on the fly. One pass
  • n the way out and on return – used for

distributed clocks timing..

slide-7
SLIDE 7

EPICS Collaboration Meeting, CEA, Saclay, Oct 2014 Picture by EtherCAT Technology Group

slide-8
SLIDE 8

EPICS Collaboration Meeting, CEA, Saclay, Oct 2014

  • Configure FMMU for LRW packets

Master startup

slide-9
SLIDE 9

EPICS Collaboration Meeting, CEA, Saclay, Oct 2014

Contents

  • EtherCAT
  • Diamond setup

– Hardware – EPICS driver

  • Recent work and work in-progress

– Screenshots from actual setup

slide-10
SLIDE 10

EPICS Collaboration Meeting, CEA, Saclay, Oct 2014

Channel Access Clients

Experimental Remote I/O

TCP/IP Various networks 1U PC IOC PCIe EVR Timing interface panel Timing system IOC Remote I/O Network

PLC Equipment Video Motion

Remote IO Modules

Other

slide-11
SLIDE 11

EPICS Collaboration Meeting, CEA, Saclay, Oct 2014

Hardware: Master and slaves

slide-12
SLIDE 12

EPICS Collaboration Meeting, CEA, Saclay, Oct 2014

IOC Remote I/O Fieldbus (EtherCAT) Remote IO Modules Beamline network (TCP/IP)

View at the back of a server

slide-13
SLIDE 13

EPICS Collaboration Meeting, CEA, Saclay, Oct 2014

View at the back of a Front End server

IOC Remote I/O Fieldbus (EtherCAT) Remote IO Modules Instrumentation Network (TCP/IP) Controls Network (TCP/IP)

slide-14
SLIDE 14

EPICS Collaboration Meeting, CEA, Saclay, Oct 2014

Contents

  • EtherCAT
  • Diamond setup

– Hardware – EPICS driver

  • Recent work and work in-progress

– Screenshots from actual setup

slide-15
SLIDE 15

EPICS Collaboration Meeting, CEA, Saclay, Oct 2014

  • EtherLab Master

– www.etherlab.org – Open source, GPLv2 – Realtime Linux (RTAI, Preempt_RT and others) – Part of Etherlab, marketed by IgH (Germany)

EtherCAT Scanner (Master)

slide-16
SLIDE 16

EPICS Collaboration Meeting, CEA, Saclay, Oct 2014

  • Kernel module
  • User space and kernel space API
  • Generic and hardware specific network driver
  • FMMU setup and slave state machine control
  • Scan timer not provided. Using 1 KHz. 10

KHz possible.

  • Configuration not provided

Etherlab Master

slide-17
SLIDE 17

EPICS Collaboration Meeting, CEA, Saclay, Oct 2014 Standard Ethernet Driver Network Stack Generic Ethernet Driver Module EtherCAT Master Module libethercat Hardware (Network Interface Card) Fieldbus Scanner

EPICS IOC EPICS Records Asyn Driver

Kernelspace Preempt RT Linux Kernel Userspace Hardware Etherlab (Master)

EPICS IOC EPICS Records Asyn Driver EPICS IOC EPICS Records Asyn Driver

Diamond ethercat

Diamond EtherCAT Driver

slide-18
SLIDE 18

EPICS Collaboration Meeting, CEA, Saclay, Oct 2014

  • EtherCAT integrated into EPICS. Uses

– PREEMPT_RT Linux – Etherlab Ethercat Master for Linux – Asyn

  • Scanner broadcast bus data to several Soft

IOCs for segregation of areas. Automatic Asyn port creation

– One port per slave – One port for master status

18

Diamond EtherCAT Driver

slide-19
SLIDE 19

EPICS Collaboration Meeting, CEA, Saclay, Oct 2014

Recent work and work in progress

  • PDO assignments
  • SDO read/write
  • Worst Case Response Time patch
  • Interfacing to Beckhoff Embedded PC

CX9020

slide-20
SLIDE 20

EPICS Collaboration Meeting, CEA, Saclay, Oct 2014

PDO assignment in screenshots

slide-21
SLIDE 21

EPICS Collaboration Meeting, CEA, Saclay, Oct 2014

SDO configuration

slide-22
SLIDE 22

EPICS Collaboration Meeting, CEA, Saclay, Oct 2014

Worst Case Response Time

  • Reduce WCRT from 3 to 2 (Damien Lynch, ANSTO)
slide-23
SLIDE 23

EPICS Collaboration Meeting, CEA, Saclay, Oct 2014

Interfacing to CX9020

  • Work by Damien Lynch at ANSTO
  • Adds Float64 data type
slide-24
SLIDE 24

EPICS Collaboration Meeting, CEA, Saclay, Oct 2014

Thank you for listening!

http://controls.diamond.ac.uk/downloads/support/ethercat/ Thanks to: James Rowland Linda Pratt Peter Leicester Tom Cobb Ian Gillingham Andy Foster Damien Lynch (Ansto) Kevin Wilkinson Armin Wagner