Skip to content

Beckhoff ADS

ADS (Automation Device Specification) is Beckhoff’s protocol for talking to the TwinCAT runtime. inSCADA supports it natively, in the client role only.

Addressing is symbolic: a variable is read by its name in the PLC program.

Two kinds of addressing nest inside each other in ADS, and confusing them is the commonest mistake:

LayerWhat it reachesWhere it is given
TCPThe TwinCAT routerThe connection’s ip / port (48898)
AMSThe runtime behind that routerTarget NetId + the device’s AMS Port

An AMS NetId is six dot-separated numbers (each 0 – 255). A mistyped one is refused at the save, not at the first poll.

ParameterDefaultDescription
IP Address—The TwinCAT router’s address
Port48898The router’s TCP port
Target NetId—The target runtime’s AMS NetId
Source NetId—inSCADA’s own AMS NetId
Timeout (ms)2000The request timeout (100 – 60000)
Connect Timeout (ms)3000The connect timeout (100 – 60000)

Each device corresponds to one of the PLC’s runtimes.

ParameterDefaultDescription
AMS Port851The runtime’s AMS port
Scan Time—The polling interval (at least 100 ms)
Scan Type—PERIODIC or FIXED_DELAY

In TwinCAT 3 the first PLC runtime is 851, the second 852, and so on. When one PLC holds several runtimes, define a device for each — the connection stays the same.

ParameterDefaultDescription
Use Subscription ModeoffTake values from the PLC’s notifications
Cycle Time (ms)50How often the PLC checks the value (1 – 60000)
Max Delay (ms)0How long notifications are gathered for (0 – 60000)

With a subscription on, the PLC checks each value every cycle time and sends it when it has changed; max delay is how long notifications are gathered into one packet. 0 means “do not gather, send at once”.

ParameterDefaultDescription
Symbol—The variable’s name in the PLC program (max 255 characters)
Type—The data type
String Length80The length for STRING / WSTRING (1 – 65535)
BOOLBYTEUSINTSINT
WORDUINTINTDWORD
UDINTDINTLWORDULINT
LINTREALLREALSTRING
WSTRINGTIMELTIMEDATE
TIME_OF_DAYDATE_AND_TIME

The PLC’s symbol list can be browsed, so variables are picked from it by name.

  • Connections — defining a connection
  • S7 Plus — the other symbolically addressed protocol