The TwinCAT ADS interface to the EAP device

The TwinCAT EAP device provides a TwinCAT ADS/AMS interface for other communication partners (e.g. virtual field devices or Windows programs) and acts as an ADS/AMS server. ADS stands for Automation Device Specification. It describes a device- and fieldbus-independent interface. AMS stands for Automation MessageSpecification and enables central and decentral systems to be addressed, such as PCs or bus controllers. ADS/AMS was specified by Beckhoff and is supported by the TwinCAT router. Messages that are sent in a network beyond the computer boundaries are transferred via TCP/IP.

The CANopen communication channel SDO (Service Data Object) can also be used via this interface. The primary purpose of the SDOs is to read and write the parameters of the CANopen Object Dictionary (OD). The transmission of the SDOs takes place as a confirmed data transfer in the form of a point-to-point connection between two communication partners and is embedded in ADS:

Using the ADS Read or ADS Write commands on the port 0xFFFF and the NetID of the EAP device ("Protocol" tab), the parameters, or the SDO description of the CANopen OD respectively, are read or written. As listed in the table, the communication channel CANopen SDO is embedded in the ADS protocol as follows:

CANopen SDO
communication

ADS Command

Index group

Index offset

Meaning

SDO Upload

Read

0xF302

Index and subindex of an SDO.
Bit 16-31: Index
Bit 8: Complete Access
Bit 0-7: Subindex

Sample:
0x16010001:
Index = 0x1601
Complete Access = 0
Subindex = 1

The subindex has no meaning if Complete Access = 1

Data Type: UINT8[n]

SDO Upload Request:
The object is addressed on the basis of the Index Offset and its contents can be read with the help of an ADS Read.

SDO Download

Write

0xF302

Index and subindex of an SDO.
Bit 16-31: Index
Bit 8: Complete Access
Bit 0-7: Subindex

Sample:
0x16010001:
Index = 0x1601
Complete Access = 0
Subindex = 1

The subindex has no meaning if Complete Access = 1

Data Type: UINT8[n]

SDO Download Request:
The object is addressed on the basis of the Index Offset and its contents can be written with the help of an ADS Write.

SDO Information

Get Object List

Read

0xF3FC

Bit 16-31: List types

 

 

 

 

 

 

 

Samples:

0x00000000: Returns the number of all objects existing for each list type

 

 

 

0x00010000: Returns the indices of all objects for the specified list type

Returns the indices of the objects that belong to the list type specified in the Index Offset.

Possible list types are:
ALL_OBJECTS = 1
RXPD_OBJECTS = 2
TXPD_OBJECTS = 3
BACKUP_OBJECTS = 4
SETTING_OBJECTS = 5

Data Type: UINT16[6]

If list type = 0000:
Element = 0 : number of list types

Element > 0 : number of existing objects belonging to the nth list type

Data Type: UINT16[n]

If list type > 0000:
Element n=0 : number of existing objects belonging to this list type plus one.

Element n>0: the nth object index belonging to this list type

SDO Information

Get Object Description

Read

0xF3FD

Bit 16-31: Index

Read the SDO description of the complete object with the specified index.

SDO Information

Get Entry Description

Read

0xF3FE

Bit 16-31: Index

Bit 0-7: Subindex

Read the SDO description of the individual entry with the specified subindex belonging to the object with the specified index.