Configure the Beckhoff TwinCAT Connector
Configure Beckhoff TwinCAT ADS instances and items, discover PLC symbols, verify communication, and troubleshoot common errors.
The Beckhoff TwinCAT Connector reads and writes PLC symbols through the Beckhoff Automation Device Specification (ADS) protocol. Use this guide to configure a TwinCAT instance, discover or create items, select data types, verify communication, and resolve common ADS errors.
This guide replaces the separate Beckhoff TwinCAT instance, item setup, and troubleshooting guides.
Before you begin
- Install and enable the Beckhoff TwinCAT Connector.
- Connect SIA Connect and the TwinCAT target to networks that can reach each other.
- Start the TwinCAT runtime and put the PLC project in the required operating state.
- Identify the target IP address, target AMS NetId, and ADS port.
- Configure an ADS route on the TwinCAT target for SIA Connect.
- Make the PLC symbols available to the ADS symbol server if you want to use item discovery.
The route on the TwinCAT target must accept ADS requests from SIA Connect. Do not configure the route as Unidirectional. A unidirectional route allows TwinCAT to send requests, but it does not accept requests from the remote system.
For PLC-side route instructions, see Setting up ADS Route in TwinCAT. For the meaning of the Unidirectional option, see Directed ADS communication in the Beckhoff Information System.
Configure a Beckhoff TwinCAT instance
- Open Workspace > Instances.
- Select Create instance.
- Select the Beckhoff TwinCAT Connector.
- Enter a descriptive instance name.
- Enter the IP address or hostname of the TwinCAT target in Address.
- Complete the Connector parameters described below.
- Select Save.
Instance parameters
| Parameter | Required | Default | Description |
|---|---|---|---|
| Address | Yes | None | IP address or hostname of the TwinCAT target. |
| ADS Port | Yes | 801 |
ADS port of the PLC runtime. The default matches TwinCAT 2 runtime system 1. TwinCAT 3 runtime system 1 normally uses 851. Confirm the port configured for the target runtime. |
| Target AMS NetId | Yes | None | Six-part AMS NetId of the TwinCAT target. A common format is the target IPv4 address followed by .1.1, for example 192.168.1.20.1.1. Use the value configured on the target. |
| Local AMS NetId | No | Empty | Sets a specific local AMS NetId for SIA Connect. Leave this empty unless the ADS route uses a defined local AMS NetId. When used, enter the same six-part value configured for SIA Connect in the target route. |
| Timeout | No |
15000 ms |
Maximum time in milliseconds for communication with the TwinCAT target. A value of 0 or a negative value uses the default. |
| Timestamp | No | Local timestamp | Selects the timestamp assigned to received values. Server timestamp uses the timestamp in the ADS notification from the target. |
Beckhoff assigns different ADS ports to different runtime systems. For example, TwinCAT 2 commonly uses 801, 811, 821, and 831. TwinCAT 3 commonly uses 851, 852, 853, and 854. See T_AmsPort in the Beckhoff Information System.
Discover items
The Connector can read the symbol table from an online TwinCAT instance and return supported PLC symbols as item candidates. It does not support instance discovery.
- Open the configured Beckhoff TwinCAT instance.
- Open its Items area.
- Select Discover items.
- Select Search items.
- Wait for the search to finish.
- Review the returned symbol names, descriptions, data types, and parameters.
- Select the items you want to add.
- Select Add selected.
- Review the import results.
For each supported symbol, discovery uses the symbol name as the item name and Variable name. A PLC symbol comment becomes the item description. Discovered candidates are marked for read and write, but the TwinCAT target still controls whether a specific symbol can be written.
Discovery imports supported primitive symbols. It skips arrays, structures, symbols with unsupported types, empty names, and malformed symbol entries. To use a primitive element inside an array or structure, create it manually with its exact symbolic name if the TwinCAT symbol server exposes that element.
The discovery component can identify some time and date symbol types that are not available in the current item type list. Only use a discovered item when its selected type is supported by the Connector runtime and the returned value is correct.
Create an item manually
- Open the Beckhoff TwinCAT instance.
- Open its Items area.
- Select Create item.
- Enter a descriptive item name.
- Enter the exact TwinCAT symbol in Variable name, for example
MAIN.device_speed. - Select the matching Type.
- Configure the item access, update interval, and other standard item settings.
- Select Save.
The symbol and selected data type must match the PLC project. Preserve the complete symbol path, including program, global variable list, structure member, and array index when applicable.
Item parameters
| Parameter | Required | Default | Description |
|---|---|---|---|
| Variable name | Yes | None | Exact ADS symbol name exposed by the PLC, for example MAIN.device_speed. |
| Type | Yes | BOOL | Data type used to decode values received from the PLC and encode values written to it. |
| Notification transmission mode | No | On value change | The item editor offers On value change and Cyclic interval. In the current Connector version, the runtime creates cyclic ADS notifications based on the item update interval regardless of this selection. |
The item's update interval is used as the ADS notification cycle time. Choose an interval that meets the application requirement without creating unnecessary PLC or network load.
Supported item types
| Type | Size | Description |
|---|---|---|
| BOOL | 1 byte | Boolean value represented as 0 or 1. |
| WORD | 2 bytes | Unsigned 16-bit value. |
| DWORD | 4 bytes | Unsigned 32-bit value. |
| SINT | 1 byte | Signed 8-bit integer. |
| USINT | 1 byte | Unsigned 8-bit integer. |
| INT | 2 bytes | Signed 16-bit integer. |
| UINT | 2 bytes | Unsigned 16-bit integer. |
| DINT | 4 bytes | Signed 32-bit integer. |
| UDINT | 4 bytes | Unsigned 32-bit integer. |
| REAL | 4 bytes | 32-bit floating-point value. |
| LREAL | 8 bytes | 64-bit floating-point value. |
| STRING | 81 bytes | Text value with a maximum configured buffer of 80 characters plus the terminating character. |
Select the type that exactly matches the PLC symbol. A mismatched type can produce an incorrect value or an ADS size error. Perform writes only when it is safe for the machine and process.
Verify the configuration
- Enable the Connector and instance.
- Confirm that the instance becomes online without an error.
- Enable at least one readable item.
- Confirm that the item receives the expected value at its configured update interval.
- If the item is writable, perform a controlled write and confirm the result in TwinCAT.
A successful instance connection confirms that the address, AMS NetId, ADS port, route, and basic ADS communication are valid. It does not confirm that every symbol exists or permits the configured read and write operations.
Troubleshoot the Connector
| Message or condition | Likely cause | Action |
|---|---|---|
| Invalid local AMS Net Id | The local value is not a valid six-part AMS NetId. | Enter six numeric parts separated by periods, or leave Local AMS NetId empty when a fixed value is not required. |
| Invalid target AMS Net Id | The target value is empty or malformed. | Copy the AMS NetId from the TwinCAT target and confirm that it contains six numeric parts. |
| Target port not found – ADS server is not started or is not reachable. | The configured ADS port does not identify an active runtime. | Start the PLC runtime and enter its correct ADS port. Check whether the target uses TwinCAT 2 port 801, TwinCAT 3 port 851, or another runtime port. |
| Target computer not found – AMS route was not found. | The TwinCAT target does not have a usable route for SIA Connect. | Create or correct the ADS route. Confirm that its remote address and SIA Connect AMS NetId match the instance and network configuration. |
| Invalid ADS port or ADS-port not opened | The ADS port value is invalid, closed, or assigned to another service. | Verify the runtime's ADS port and confirm that the runtime is active. |
| Access denied or Reading/writing not permitted | The route is unidirectional, the PLC security settings reject the request, or the symbol is not writable. | Clear Unidirectional on the target route. Review TwinCAT route security, symbol permissions, and whether the attempted operation is allowed. |
| Timeout connecting, Timeout elapsed, Host unreachable, or TCP send error | The target cannot be reached or did not respond before the timeout. | Verify the address, power, cabling, subnet, routing, and firewall. Test the target with the Edge Portal Ping tool. Increase Timeout only when the network is reachable but responds slowly. |
| Symbol not found | The variable name does not match a symbol currently exposed by the PLC. | Confirm the complete symbol path and spelling. Download the current project and make its symbols available, or run item discovery again. |
| Symbol version invalid, Symbol not active, or Notification handle is invalid | An online change or project download invalidated an existing symbol or notification handle. | Confirm that the symbol still exists, then disable and enable the instance or restart the Connector so it creates new handles. |
| Instance is online but an item has no value | The item is disabled, the symbol is unavailable, the selected type is wrong, or no ADS notification has been received. | Enable the item, check its update interval, verify the variable name and type, and review its error and the Connector logs. |
| No items are returned by discovery | The target returned no supported primitive symbol metadata. | Confirm that the PLC project exposes symbols through the ADS symbol server. Verify the route and instance parameters. Arrays, structures, and unsupported types are not returned as candidates. |
| Discovery reports skipped array or unsupported symbols | The symbol table contains data types that the current discovery implementation does not expand or support. | Add supported primitive members manually when they are exposed as individual symbols, or leave those candidates unconfigured. |
If an ADS error continues after correcting the configuration, review the instance error, item error, and Connector logs together. The numeric ADS error code in the logs can identify the rejected operation more precisely.