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 separate addressing layers
Section titled “Two separate addressing layers”Two kinds of addressing nest inside each other in ADS, and confusing them is the commonest mistake:
| Layer | What it reaches | Where it is given |
|---|---|---|
| TCP | The TwinCAT router | The connection’s ip / port (48898) |
| AMS | The runtime behind that router | Target 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.
Connection
Section titled “Connection”| Parameter | Default | Description |
|---|---|---|
| IP Address | — | The TwinCAT router’s address |
| Port | 48898 | The router’s TCP port |
| Target NetId | — | The target runtime’s AMS NetId |
| Source NetId | — | inSCADA’s own AMS NetId |
| Timeout (ms) | 2000 | The request timeout (100 – 60000) |
| Connect Timeout (ms) | 3000 | The connect timeout (100 – 60000) |
Device — the runtime port
Section titled “Device — the runtime port”Each device corresponds to one of the PLC’s runtimes.
| Parameter | Default | Description |
|---|---|---|
| AMS Port | 851 | The 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.
Frame — polled or notified
Section titled “Frame — polled or notified”| Parameter | Default | Description |
|---|---|---|
| Use Subscription Mode | off | Take values from the PLC’s notifications |
| Cycle Time (ms) | 50 | How often the PLC checks the value (1 – 60000) |
| Max Delay (ms) | 0 | How 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”.
Variable
Section titled “Variable”| Parameter | Default | Description |
|---|---|---|
| Symbol | — | The variable’s name in the PLC program (max 255 characters) |
| Type | — | The data type |
| String Length | 80 | The length for STRING / WSTRING (1 – 65535) |
Data types
Section titled “Data types”BOOL | BYTE | USINT | SINT |
WORD | UINT | INT | DWORD |
UDINT | DINT | LWORD | ULINT |
LINT | REAL | LREAL | STRING |
WSTRING | TIME | LTIME | DATE |
TIME_OF_DAY | DATE_AND_TIME |
Browsing symbols
Section titled “Browsing symbols”The PLC’s symbol list can be browsed, so variables are picked from it by name.
Related
Section titled “Related”- Connections — defining a connection
- S7 Plus — the other symbolically addressed protocol