Skip to content

Beckhoff ADS ​

TwinCAT is a control technology developed by Beckhoff Automation. It is a software-based control system used in automation and control applications. TwinCAT is capable of running on a variety of platforms and supports various programming languages.

For the generic steps, see Create a Southbound Driver and Groups and Tags.

The EMQX Neuron ADS driver enables users to connect to Beckhoff TwinCAT PLC over TCP/IP.

Add Driver ​

On Data Collection → South Devices, click Add Device.

  • Name: The name of this device node.
  • Driver: Select the Beckhoff driver.

Connection Parameters ​

Click the driver card to open the Device Configuration page and fill in:

ParameterDescription
PLC IP AddressIP address of the remote device.
PLC PortTCP port of the remote device (default 48898).
Source AdsAmsNetIdAMS Net ID of the machine running neuron.
Source AdsPortNrAMS port number of the machine running neuron (default 851).
Target AdsAmsNetIdAMS Net ID of the target PLC.
Target AdsPortNrAMS port number of the target PLC (default 851).

Note that an ADS route corresponding to the parameter setting should be created in the target TwinCAT software, so that EMQX Neuron could correctly communicate with the TwinCAT PLC.

Below are the relevant ADS key concepts:

ConceptsDescription
ADS protocolADS (Automation Device Specification) is the communication protocol of TwinCAT. It enables the data exchange and control of TwinCAT systems via media-independent serial or network connections. ADS was designed to provide a standardized interface for communication between the controller and the user interface in a TwinCAT system.
AMS Net IDThe AMS Net ID is the address of the local computer in the TwinCAT network. It consists of 6 bytes and is represented in a dot notation (e.g., "1.2.3.4.5.6"). The AMS Net IDs must be unique in the TwinCAT network to avoid communication conflicts. By default, TwinCAT generates an AMS Net ID by appending ".1.1" to the IP address of the system. For example, in a system with IP address "172.17.213.60", the default generated AMS Net ID would be "172.17.213.60.1.1". Note: For accuracy, always confirm the AMS Net ID directly within the TwinCAT environment, as the default appending of ".1.1" to the system's IP address may not be consistent in every instance.
AMS portAn ADS device in the TwinCAT network is identified by an AMS Net ID and a AMS port number. Each TwinCAT system typically uses specific port numbers designated as reserved for certain purposes. For example, port 801 is reserved for system communication, and port 851 is reserved for event notification.
Index group/offsetADS index group and index offset are specifications used in the TwinCAT ADS system services for data exchange between devices or programs. All read/write operations take place on the PLC via the index group and index offset. The index group is of 16 bits and the index offset is of 32 bits. The index group is used to specify the category or type of data that is being accessed, while the index offset specifies the specific data element within that category or type.

Tag Configuration ​

The data types and address formats supported by this driver are listed below.

Data Types ​

  • BOOL
  • INT8
  • UINT8
  • INT16
  • UINT16
  • INT32
  • UINT32
  • INT64
  • UINT64
  • FLOAT
  • DOUBLE
  • STRING

Address Format ​

In the context of the ADS driver, a tag address consists of two components, INDEX_GROUP and INDEX_OFFSET, which represents the index group and the index offset respectively.

INDEX_GROUP,INDEX_OFFSET

Both INDEX_GROUP and INDEX_OFFSET could be in decimal or hexadecimal format.

Example Addresses ​

AddressData TypeDescription
0x4040,0x7d01cboolindex_group 0x4040, index_offset 0x7d01c
16448,51029uint8index_group 0x4040, index_offset 0x7d01d
0x4040,512896.5stringindex_group 0x4040, index_offset 0x7d380, string length 5

Use Case ​

You can use EMQX Neuron to collect data from Beckhoff software PLCs using the EMQX Neuron ADS driver, for details, see Data Acquisition with Beckhoff ADS Driver.