Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Page properties
hiddentrue
idconnector-metadata


Property

Value

Sector

Automation Vendors

Group

Beckhoff

Connector

Beckhoff TwinCAT devices

Name

TwinCAT

Protocol

ADS


Devices compatible with TwinCAT PLC/IO

  • Name: TwinCAT
  • Version 2.5.0.1
  • Protocol: ADS
  • Interface: TCP/IP
  • Runtime: .NET 4.8 (Windows)
  • Configuration:
    • Devices / Protocols


On this page:

Table of Contents
maxLevel2
minLevel2
stylenone


Overview

TwinCAT supports Solution Import Tags to setup automatically the mapping.

→ For more information go to Importing Tags from TwinCAT.


Info

The TwinCAT communication driver is supported only in Windows Solutions.



Nodes Configuration

Station Configuration

Stations syntax: <AmsNetID> ; <AmsSrvPort>

 Where :

  • <AmsNetID> = AmsNet ID of the PLC
  • <AmsSrvPort> = Port number used for communication.

E.g.: 192.168.1.1.1.1; 801



Points Configuration

Address

The syntax for the TwinCAT communication points is:

  • <DeviceTagName>

<DeviceTagName>:  Tag Name in PLC.

E.g.: .TAGNAME

Address Prefixes

The software platform supports two specific prefixes in the Address field in the DevicePoints table: TEMPLATE: and DATE:. The TEMPLATE: prefix is used before the PLC address when the point references a DataTemplate or an array. The DATE: prefix is used when the point represents a TwinCAT DATE or DATE_AND_TIME variable.

When working with arrays that contain DATE or DATE_AND_TIME types and are also part of a DataTemplate, both prefixes are combined in the following order:

TEMPLATE:DATE:<my_address>

In the RelativeAddress field of a DataTemplate, used for tag template expansion, only the DATE: prefix is applied, without the TEMPLATE: prefix.

Arrays

If an array is not zero-indexed, the Address field in the DevicePoints table must include the array's starting index in brackets.

Example 1:
If the TwinCAT array is defined as intArray : ARRAY[2..5] OF INT,
then the value in the Address column should be:
TEMPLATE:intArray[2]

Example 2:
If the TwinCAT array is defined as intMatrix : ARRAY[2..5, 0..3, 4..7] OF INT,
then the value in the Address column should be:
TEMPLATE:intMatrix[2][0][4]

For zero-indexed arrays (e.g., ARRAY[0..N]), it is not necessary to specify the initial index in the address. In those cases, you can simply use the array name (e.g., intArray) in the Address column.

Arrays with Non-Zero-Based Indexing inside Structs

When defining a DataTemplate for a TwinCAT struct that includes an array with a non-zero starting index, the initial index must be specified in the RelativeAddress column of the corresponding DataTemplate member, following the same approach demonstrated in the examples above. The TwinCAT Tag Importer handles this automatically.


Driver Revision History

TwinCAT Revision History

Version 

Notes

2.5.0.1

Initial release on new documentation standards.



In this section...

Page Tree
root@parent
spaces93DRAFT