ethercat seminar document.pdf

22
- 1 - 1Introduction EtherCAT 2014. 12. 22

Upload: nguyen-quang-vinh

Post on 05-Dec-2015

316 views

Category:

Documents


9 download

TRANSCRIPT

Page 1: EtherCAT Seminar Document.pdf

- 1 -

제1장 Introduction

EtherCAT

2014. 12. 22

Page 2: EtherCAT Seminar Document.pdf

- 2 -

제1장 Introduction

목차

EtherCAT Overview

Slave Implementation Guide

ARM Board Guide

Page 3: EtherCAT Seminar Document.pdf

- 3 -

제1장 Introduction

EtherCAT Overview

Layer Model: Physical, Data Link, and Application Layer

Page 4: EtherCAT Seminar Document.pdf

- 4 -

제1장 Introduction

EtherCAT Overview

Physical Layer

Shielded twisted pair of wires

RJ45 connector standard

PHY for auto negotiation and auto crossover recommended

Frame Processing: Auto Forwarder and Loop Back

Page 5: EtherCAT Seminar Document.pdf

- 5 -

제1장 Introduction

EtherCAT Overview

Data Link Layer

Links physical and application layer

Operate based on EtherCAT Slave Controller (ESC)

EtherCAT Processing Unit

FMMU

SyncManager

EtherCAT Address SpaceProcess Data

Interface

Microcontroller

SPI interface/

Parallel interface

PHY

Management

PHY

EtherCAT Slave Controller

(ESC)

Block diagram of EtherCAT slave contronller

Page 6: EtherCAT Seminar Document.pdf

- 6 -

제1장 Introduction

EtherCAT Overview

Data Link Layer

Frame Structure

Page 7: EtherCAT Seminar Document.pdf

- 7 -

제1장 Introduction

EtherCAT Overview

Data Link Layer

Memory/Registers: Divided into registers and DPRAM

Registers: first 4 kByte of memory

DPRAM: up to 60 kByte, start at 1000h

Page 8: EtherCAT Seminar Document.pdf

- 8 -

제1장 Introduction

EtherCAT Overview

Data Link Layer

SyncManager

Both master and local microcontroller access DPRAM in the ESC

SyncManager is a mechanism to protect data in the DPRAM from

being accessed simultaneously

FMMU(Fieldbus Memory Management Unit)

FMMU map data from the logical address in the master to the

physical memory in the slave devices

Page 9: EtherCAT Seminar Document.pdf

- 9 -

제1장 Introduction

Application Layer

State Machine: Init, Pre-Op, Safe-Op, and Op

Slave checks ESC register settings received from master and

mailbox. When appropriate, go next sate in AL status register

Page 10: EtherCAT Seminar Document.pdf

- 10 -

제1장 Introduction

Application Layer

EtherCAT State Machine Registers

Page 11: EtherCAT Seminar Document.pdf

- 11 -

제1장 Introduction

EtherCAT

Slave Implementation Guide

Page 12: EtherCAT Seminar Document.pdf

- 12 -

제1장 Introduction

Slave Implementation Guide

Component to develop for EtherCAT Devices

Page 13: EtherCAT Seminar Document.pdf

- 13 -

제1장 Introduction

Slave Implementation Guide

Application Layer Communication Protocol

CoE, SoE, EoE, FoE and AoE

ESC Structure for CAN Application Slave Stack Code Overview

Page 14: EtherCAT Seminar Document.pdf

- 14 -

제1장 Introduction

Slave Implementation Guide

Object Dictionary

Page 15: EtherCAT Seminar Document.pdf

- 15 -

제1장 Introduction

Slave Implementation Guide

Process Data Interface

SPI: PDI type is set to 0x05 in PDI control register 0x1400

Parallel: PDI type is set to 0x05 in PDI control register 0x1400

MicrocontrollerEtherCAT Slave

Controller (ESC)

ET100ARM Cortex-M3

MOSI

SPI_SEL

SPI_CLK

SPI_IRQ

MIS0

EEPROM_LOADED

SPI Interconnection

MicrocontrollerEtherCAT Slave

Controller (ESC)

ET100ARM Cortex-M3

DATA [15:0]

CS

ADR [15:0]

WR

RD

BUSY

IRQ

16 bit asynchronous interconnection

Page 16: EtherCAT Seminar Document.pdf

- 16 -

제1장 Introduction

EtherCAT

ARM Board Guide

Page 17: EtherCAT Seminar Document.pdf

- 17 -

제1장 Introduction

ARM Board Guide

Modify XML file of FASTECH from SPI interface to 16 bit

asynchronous interface

Copy this file to EtherCAT folder of TwinCAT

SPI Interconnection 16 bit asynchronous interconnection

Page 18: EtherCAT Seminar Document.pdf

- 18 -

제1장 Introduction

ARM Board Guide

Open TwinCAT and Configure ESI (EtherCAT Slave

Information) for EEPROM via TwinCAT

Chose Slave EtherCAT tab Advanced Settings

Slave

Page 19: EtherCAT Seminar Document.pdf

- 19 -

제1장 Introduction

ARM Board Guide

In Advance Settings, chose ESC Access EEPROM

Hex Editor Download from List Download file

After downloading, close TwinCAT and Open again

Page 20: EtherCAT Seminar Document.pdf

- 20 -

제1장 Introduction

ARM Board Guide

After configuring ESI, download EtherCAT slave source

code to ARM

Change Position Demand Value in TwinCAT by changing

in COE_InputMapping function of chnappl.h

Page 21: EtherCAT Seminar Document.pdf

- 21 -

제1장 Introduction

ARM Board Guide

In TwinCAT, Chose Action tab set and reset TwinCAT

to Config Mode

Page 22: EtherCAT Seminar Document.pdf

- 22 -

제1장 Introduction

감사합니다.