For the complete documentation index, see llms.txt. This page is also available as Markdown.

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

Getting first values out of a PLC, step by step

ADS, AMS NetIDs and routes; read this once and the settings explain themselves

Every setting, with complete examples

How to address symbols, and what each message carries

Containers, VPNs, NAT, and creating routes by hand

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

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. 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.

Last updated