Machinery TwinDocs

Beckhoff TwinCAT (ADS)

Connecting over ADS, covering AMS Net IDs, routes, and local TwinCAT runtimes.

Connection settings

SettingValue
IP addressThe TwinCAT PC's IP
AMS Net IDThe target's Net ID, e.g. 192.168.1.20.1.1, optional if it is derivable from the IP
PortADS port of the runtime, 851 for the first TwinCAT 3 PLC instance (801 for TwinCAT 2)

The ADS route

ADS requires a route between your PC and the TwinCAT target, an entry in the target's route table naming your PC. Add it on the target (or via TwinCAT XAE: System → Routes → Add) with your PC's IP and a name. Without a route, connections are refused regardless of correct settings.

Addressing

ADS reads symbols by name, using the full symbol path from your PLC program:

MAIN.fbConveyor.ActPosition
GVL_Axes.Axis1.NcToPlc.ActPos

Symbolic access means no address bookkeeping: if it's in the symbol table, its path works. Match the data type to the PLC declaration (LREAL/REAL → REAL, INT → INT, DINT → DINT, BOOL → BOOL).

Testing without hardware

TwinCAT 3's runtime runs on any Windows PC (the free XAE installs it). Run the PLC project in a local runtime on the same machine or a second PC, add the route, and connect, the standard way to develop the twin against real PLC code with zero hardware. See the HIL with TwinCAT tutorial.

NC axes

For motion axes, the NC's actual position is available at Axis.NcToPlc.ActPos, mapping that straight onto the twin's axis variable replays the real interpolated motion, set-value dynamics included.

On this page