ADS Interface

Acyclic data can be transmitted to or from the EtherCAT device via ADS-Read or ADS-Write commands. It possible to communicate with the mailboxes of EtherCAT slave devices via ADS. Every EtherCAT device has its own Net-ID. The port depends on the individual Ads service :

Port

Description

65535 (0xFFFF)

General Ads services handled by the master directly.

0x1 - 0xFFFE (fixed address of a slave device)

This is an Ads services directed at an individual slave device. The port number is the same as the EtherCAT address

The NetId can be found in the edit field "NetId" on the EtherCAT tab of the EtherCAT master device:

ADS Interface 1:

The NetId can also be read out from the variable InfoData.AmsNetId:

ADS Interface 2:

Master Ads Port (0xFFFF)

The following table lists the Ads commands supported by the EtherCAT master port(0xFFFF):

Index Group

Index Offset

Access

Data type

Description

0x00000003

0x00000100

R

UINT16

Returns current state of master. Following values are returned by this service:

 

0x0000: Init State
0x0002: Pre-Operational State
0x0003: Bootstrap State
0x0004: Safe-Operational State
0x0008: Operational State

0x00000003

requested state

W

 

Request State from master.

0x00000006

0x00000000

R

UINT16

Returns the number of projected slaves.

0x00000007

0x00000000

R

UINT16[nSlaves]

Returns the fixed addresses of all slaves.

0x00000009

0x00000000

R

{

Returns the EtherCAT status and the Link status of all Slaves:

BYTE

EtherCAT state of a slave. The state can adopt one of the following values:

 

0x0000: Init State
0x0002: Pre-Operational State
0x0003: Bootstrap State
0x0004: Safe-Operational State
0x0008: Operational State

Additionally following bits can be set:
0x0010: Error State
0x0020: Invalid VPRS( VendorId, Product Code, RevisionsNo or SerialNo)
0x0040: Initialization command error

BYTE

Link status of an EtherCAT slave. The Link status can consist of an ORing of the following bits:

 

0x0000: Link ok.
0x0001: Link not present
0x0002: No communication
0x0004: Link missing
0x0008: Additional link
0x0010: Port A
0x0020: Port B
0x0040: Port C
0x0080: Port D

exampe: 0x0024 = Missing Link at port B.

}[nSlaves]

 

0x00000009

0x00000001-0x0000FFFF

(EtherCAT slave address)

R

{

Returns the EtherCAT status of the EtherCAT slave specified in the index offset.

BYTE

EtherCAT state of a slave. The state can adopt one of the following values:

 

0x0000: Init State
0x0002: Pre-Operational State
0x0003: Bootstrap State
0x0004: Safe-Operational State
0x0008: Operational State

Additionally following bits can be set:
0x0010: Error State
0x0020: Invalid VPRS( VendorId, Product Code, RevisionsNo or SerialNo)
0x0040: Initialization command error

BYTE

Link status of an EtherCAT slave. The Link status can consist of an ORing of the following bits:

 

0x0000: Link ok.
0x0001: Link not present
0x0002: No communication
0x0004: Link missing
0x0008: Additional link
0x0010: Port A
0x0020: Port B
0x0040: Port C
0x0080: Port D

exampe: 0x0024 = Missing Link at port B.

}

 

0x00000009

0x00000001-

0x0000FFFF

(EtherCAT slave address)

W

UINT16

Request a new state from the selected EtherCAT slave.

0x00000011

0x00000001-

0x0000FFFF

(EtherCAT slave address)

R

{

Returns the CANopen identity object of an EtherCAT slave device.

UINT32

Vendor Id

UINT32

Product Code

UINT32

Revision Number

UINT32

Serial Number

}

 

0x00000012

0x00000000

R

{

Returns the Crc error counters of all slaves.

UINT32

Crc error counter of port A +

error counter of port B +
error counter of port C +
error counter of port D +

}[nSlaves]

 

0x00000012

0x00000001-

0x0000FFFF

(EtherCAT slave address)

R

{

Returns the Crc error counters of the EtherCAT slave specified in the index offset.

UINT32

Crc error counter of port A.

UINT32

Crc error counter of port B.

UINT32

Crc error counter of port C.

UINT32

Crc error counter of port D.

}

 

0x0000000C

0

R

{

Returns frame counters and and lost frame counters

UINT32

system time

UINT32

number of cyclic frames sent by master

UINT32

number of lost cyclic frames

UINT32

number of acyclic frames sent by master

UINT32

number of lost acyclic frames

}

 

0x0000000C

0

W

 

Resets the frame counters and lost frames counters

Slave Ads Port(0x1 - 0xFFFE)

The following table lists the Ads commands that can be sent to an EtherCAT slave device. The port number is same as the fixed address of the slave device:

Index Group

Index Offset

Access

Data type

Description

CANopen over EtherCAT

 

 

 

 

0x0000F302

Index and Subindex of an SDO.

 

HIWORD(0xyyyy0000)= index

LOBYTE(0x000000yy)= subindex

Example:

0x1c120001:

index = 0x1c12
subindex = 1

 

HIBYTE of LOWORD (0x0000yy00):

R/W

UINT8[n]

SDO Upload/Download Request. The object is selected with the index offset.

0x01

Complete
Access

0x0000F3FC

List type = HIWORD(0xyyyy0000)

 

Example

0x00000000: return length of the indiviual list types

0x00010000: return indexes of all objects

R

{

Returns the indexes of the list type specified in the index offset. If 0 is passed as index offset the length of each list type is returned.

UINT16

list type = 0 :number of list types

list type > 0 :list type

UINT16[n]

list type = 0: length of the list type n+1

list type > 0: length of the selected list

}

 

0x0000F3FD

index = HIWORD(0xyyyy0000)

R

 

Get SDO info description

0x0000F3FE

index = HIWORD(0xyyyy0000)

subindex = LOBYTE of LOWORD
(0x000000yy)

valueInfo = HIBYTE of LOWORD
(0x0000yy00)

R

 

Get SDO info entry description

Servo Drive over EtherCAT

 

 

 

 

0x0000F420

IDN = LOWORD(0x0000yyyy)

element = LOBYTE of HIWORD
(0x00yy0000) :

R/W

UINT8[n]

Upload/Download IDN

0x01

Data Status

0x02

Name (read only)

0x04

Attribute

0x08

Unit

0x10

Minimum

0x20

Maximum

0x40

Value

0x80

Default

Drive Number = Bits 1-3 of HIBYTE of HIWORD
(0xy0000000)

Command Flag = Bit 8 of HIBYTE of HIWORD
(0xy0000000)