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.
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 can not be altered.
Example:
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 only)
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 that is to be read or written.
TCP port number
The TCP port number for the ADS protocol is 48898 or 0xBF02.