> For the complete documentation index, see [llms.txt](https://docs.umh.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.umh.app/benthos-umh/input/beckhoff-ads.md).

# Beckhoff ADS (experimental)

**This protocol is experimental. It has been tested on CX7000 and CX8190 (TwinCAT 3) and CX1020 (TwinCAT 2); behaviour on other controllers may differ.**

This input reads variables from Beckhoff PLCs over ADS by symbol name, either as change notifications pushed by the PLC or as interval polling. It works with TwinCAT 2 and TwinCAT 3, runs from a virtual machine or a container, and can register its own route on the PLC.

This input reads **symbols only**: named variables such as `GVL_ProcessData.nMasterCycleCounter`. Direct addresses (`%MB100`) are not supported.

## Where to go

| Page                                                                            | For                                                                            |
| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ |
| [Quick start](/benthos-umh/input/beckhoff-ads/quick-start.md)                   | Getting first values out of a PLC, step by step                                |
| [How it works](/benthos-umh/input/beckhoff-ads/how-it-works.md)                 | ADS, AMS NetIDs and routes; read this once and the settings explain themselves |
| [Configuration](/benthos-umh/input/beckhoff-ads/configuration.md)               | Every setting, with complete examples                                          |
| [Symbols and metadata](/benthos-umh/input/beckhoff-ads/symbols-and-metadata.md) | How to address symbols, and what each message carries                          |
| [Networking](/benthos-umh/input/beckhoff-ads/networking.md)                     | Containers, VPNs, NAT, and creating routes by hand                             |
| [Troubleshooting](/benthos-umh/input/beckhoff-ads/troubleshooting.md)           | Symptoms, causes, and what the log lines mean                                  |

## Prerequisites

Have these ready before you start. Everything else has a working default.

|                           | What you need                                                              | How to check                                                                                                                                                          |
| ------------------------- | -------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **PLC address**           | The IP address of the PLC, reachable from wherever this runs               | `ping <plc-ip>`                                                                                                                                                       |
| **ADS port open**         | TCP `48898` to the PLC                                                     | `nc -z -w3 <plc-ip> 48898`                                                                                                                                            |
| **Route port open**       | UDP `48899`, only if the plugin should register its own route              | Blocked UDP means creating the route by hand instead                                                                                                                  |
| **PLC credentials**       | An administrator user on the PLC, only for automatic route registration    | The same login you would use in TwinCAT to add a route                                                                                                                |
| **This client's address** | The address the PLC will see this client as, needed for `hostIP`           | Usually the VM's IP on the PLC network. Behind a container boundary, VPN or NAT it is something else: see [Networking](/benthos-umh/input/beckhoff-ads/networking.md) |
| **Symbol names**          | The full name of each variable, e.g. `GVL_ProcessData.nMasterCycleCounter` | Read them from the PLC project in TwinCAT                                                                                                                             |
| **A running PLC runtime** | The runtime must be in RUN, not CONFIG                                     | A stopped runtime accepts the connection and serves nothing                                                                                                           |

Two limits worth knowing up front:

* Beckhoff recommends [no more than **550 notifications per device**](https://infosys.beckhoff.com/content/1033/tc3_grundlagen/115880971.html). Above that, read in fewer, larger pieces (a struct instead of its members) or switch to `readType: interval`, which reads with sum commands.
* A PLC serves **one connection per client address**. A second client from the same address displaces the first. That second client can be another instance of this input, or an engineering station behind the same NAT gateway.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.umh.app/benthos-umh/input/beckhoff-ads.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
