TwinCAT (ADS)

Connect to a Beckhoff TwinCAT PLC over ADS and read symbols or direct addresses.

TwinCAT (ADS) reads values from a Beckhoff TwinCAT PLC over the ADS protocol. You can address values by their symbol name or by a direct index group and offset.

Connecting a TwinCAT device

SettingWhat it does
NameIdentifies the device (with an optional custom name).
EnabledWhether THMI connects to the PLC. Turn it off to stop communication and value collection without deleting it.
AMS Net IDThe unique address used to identify the PLC on the ADS network — six octets, e.g. 1.2.3.4.5.6.
HostThe hostname or IP address used to reach the PLC.
PortThe ADS port. Defaults to 851, the typical TwinCAT runtime port.

Reading a value

Set the tag’s data type (see Data types), then choose the access mode:

  • Symbol — address the value by its symbol path (the variable’s name in the PLC program). The easiest option when symbols are available. For an array data type, give the array symbol path instead.
  • Direct — address the value by its index group and index offset (the offset from which reading begins). Useful for direct memory access; the number of values sets how many to read for an array type.

Acquisition and writing

  • Acquisition method — polling reads the value every polling interval milliseconds (default 5000); subscription has the PLC push changes. Symbol access supports both; direct access supports polling only.
  • Writable — lets users with permission change the value (see Values and history).