ADS-Communication

Communication

The ADS protocol (ADS: Automation Device Specification) is a transport layer within the TwinCAT system. It was developed for data exchange between the different software modules, for instance the communication between the NC and the PLC. This protocol enables communication with other tools from any point within the TwinCAT. If communication with other PCs or devices is required, the ADS protocol can use TCP/IP as a basis. Within a networked system it is thus possible to reach all data from any point.

ADS-Communication 1:

The ADS protocol runs on top of the TCP/IP or UDP/IP protocols. It allows the user within the Beckhoff system to use almost any connecting route to communicate with all the connected devices and to parameterize them. Outside the Beckhoff system a variety of methods are available to exchange data with other software tools.

Software interfaces

ADS-OCX
The ADS-OCX is an Active-X component. It offers a standard interface to, for instance, Visual Basic, Delphi, etc.

ADS-DLL
You can link the ADS-DLL (DLL: Dynamic Link Library) into your C program.

OPC
The OPC interface is a standardized interface for communication used in automation engineering. Beckhoff offer an OPC server for this purpose.

Protocol

The ADS functions provide a method for accessing the Bus Coupler information directly from the PC. ADS function blocks can be used in TwinCAT PLC Control for this. The function blocks are contained in the PLCSystem.lib library. It is also equally possible to call the ADS functions from AdsOCX, ADSDLL or OPC.

ADS-Communication 2:

AMSNetID
The AMSNetID provides a reference to the device that is to be addressed. This is taken from the MAC address of the first Ethernet port (X001) and is printed on the side of the CX80xx. For the AMSNetID the bytes 3 to 6 plus ".1.1" are typically used.
Example:
MAC address 00-01-05-01-02-03
AMSNetID 5.1.2.3.1.1

Port number
The port number distinguishes sub-elements in the connected device.
Port 801: local process data PLC runtime 1

Index group
The index group distinguishes different data within a port.

Index offset
Indicates the offset, the byte from which reading or writing is to start.

Len
Gives the length of the data, in bytes, that is to be read or written.

TCP port number
The TCP port number for the ADS protocol is 48898 or 0xBF02.