ADS 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 TcSystem.lib library. It is also equally possible to call the ADS functions from AdsOCX, ADSDLL or OPC. It is possible to access all the data through ADS port number 300, and to access the registers of the Bus Coupler and Bus Terminals through ADS port number 100.

ADS protocol 1:
Structure of the ADS protocol

AMSNetID

The AMSNetID provides a reference to the device that is to be addressed. This is created from the set TCP/IP address and an additional 2 bytes. These additional 2 bytes consist of "1.1", and cannot be altered.
Sample:
IP address 172.16.17.128
AMSNetID 172.16.17.128.1.1

Port number

The port number distinguishes sub-elements in the connected device.
Port 100: register access
Port 300: fieldbus process data
Port 800: local process data (BC90x0, C900 only)

Index group

The index group distinguishes different data within a port.

Index offset

Indicates the offset, from which reading or writing the byte 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.