Notes on the documentation

This description is only intended for the use of trained specialists in control and automation engineering who are familiar with the applicable national standards.
It is essential that the following notes and explanations are followed when installing and commissioning these components.

The responsible staff must ensure that the application or use of the products described satisfy all the requirements for safety, including all the relevant laws, regulations, guidelines and standards.

Disclaimer

The documentation has been prepared with care. The products described are, however, constantly under development.
For that reason the documentation is not in every case checked for consistency with performance data, standards or other characteristics.
In the event that it contains technical or editorial errors, we retain the right to make alterations at any time and without warning.
No claims for the modification of products that have already been supplied may be made on the basis of the data, diagrams and descriptions in this documentation.

Trademarks

Beckhoff®, TwinCAT®, EtherCAT®, Safety over EtherCAT®, TwinSAFE® and XFC® are registered trademarks of and licensed by Beckhoff Automation GmbH.
Other designations used in this publication may be trademarks whose use by third parties for their own purposes could violate the rights of the owners.

Patent Pending

The TwinCAT Technology is covered, including but not limited to the following patent applications and patents:
EP0851348, US6167425 with corresponding applications or registrations in various other countries.

Copyright

© Beckhoff Automation GmbH & Co. KG, Germany.
The reproduction, distribution and utilization of this document as well as the communication of its contents to others without express authorization are prohibited.
Offenders will be held liable for the payment of damages. All rights reserved in the event of the grant of a patent, utility model or design.


General

The PLC software can be described as a virtual field unit (Automation Device), since it is a pure software PLC. It therefore provides a Beckhoff ADS (Automation Device Specification) interface for other communication partners (e.g. other virtual field units or Windows programs), via which it can be parameterised or interrogated. Use of the ADS standardises access to the PLC and incorporates it into the range of available virtual field units.

The READ and WRITE operations take place on the PLC interface (as defined by ADS) via two numbers: the index group (16 bit) and the index offset (32 bit). The ADS interface of the PLC will be described in more detail in the following pages with regard to the group and offset indices.

Specification "Index-Group" of the PLC

The four global ranges of an ADS unit are shown as follows for the PLC as four sections in the index groups:

Index-Group (0x = hex) | Index Group description
0x00000000 0x00000FFF | reserved
0x00001000 | PLC ADS parameter range
0x00002000 | PLC ADS status range
0x00003000 | PLC ADS unit function range
0x00004000 | PLC ADS services ( includes services to access PLC memory range (%M field) )
0x00006000 0x0000EFFF | reserved for PLC ADS extension
0x0000F000 0x0000FFFF | general TwinCAT ADS system services ( includes services to acces PLC process diagramm of the physical inputs and outputs )


"Index-Group/Offset" Specification of the PLC services

This section includes services to access the PLC memory range (%M field).
Index Group | Index Offset | Access | Data type | Phys. unit | Def. range | Description | Remarks
0x00004020 | 0x00000000- 0x0000FFFF | R/W | UINT8[n] |  |  | READ_M - WRITE_M PLC memory range(%M field).Offset is byte offset. |
0x00004021 | 0x00000000- 0xFFFFFFFF | R/W | UINT8 |  |  | READ_MX - WRITE_MX PLC memory range (%MX field).The low word of the index offset is the byte offset. The index offset contains the bit address calculated from the byte number *8 + bit number |
0x00004025 | 0x00000000 | R | ULONG |  |  | PLCADS_IGR_RMSIZE Byte length of the process diagram of the memory range |
0x00004030 | 0x00000000- 0xFFFFFFFF | R/W | UINT8 |  |  | PLCADS_IGR_RWRB Retain data range. The index offset is byte offset |
0x00004035 | 0x00000000 | R | ULONG |  |  | PLCADS_IGR_RRSIZE Byte length of the retain range |
0x00004040 | 0x00000000- 0xFFFFFFFF | R/W | UINT8 |  |  | PLCADS_IGR_RWDB Data range. The index offset is byte offset. |
0x00004045 | 0x00000000 | R | ULONG |  |  | PLCADS_IGR_RDSIZE Byte length of the data range |


"Index-Group/Offset" Specification of the TwinCAT ADS system services

This section covers those ADS services which have identical meanings and effects with every TwinCAT ADS unit. In this section are also included services to access the PLC process diagram of the physical inputs and outputs.
Index
Group 		Index
Offset 		Access Data type Description Remarks
0x0000F003 0x00000000 R&W W: UINT8[n]

R: UINT32

GET_SYMHANDLE_BYNAME

A handle (code word) is assigned to the name contained in the write data and is returned to the caller as a result.

0x0000F004 0x00000000 Reserved.
0x0000F005

0x00000000-

0xFFFFFFFF

=symHandle

R/W UINT8[n] READ_/WRITE_SYMVAL_BYHANDLE

Reads the value of the variable identified by ‚symHdl' or assigns a value to the variable. The ‚symHdl' must first have been determined by the GET_SYMHANDLE_BYNAME services.

0x0000F006 0x00000000 W UINT32 RELEASE_SYMHANDLE

The code (handle) contained in the write data for an interrogated, named PLC variable is released.

0x0000F020

0x00000000-

0xFFFFFFFF

R/W UINT8[n] READ_I - WRITE_I

PLC process diagram of the physical inputs(%I field). Offset is byte offset.

0x0000F021

0x00000000-

0xFFFFFFFF

R/W UINT8 READ_IX - WRITE_IX

PLC process diagram of the physical inputs(%IX field). The index offset contains the bit address which is calculated from byte number *8 + bit number

0x0000F025

0x00000000 R ULONG ADSIGRP_IOIMAGE_RISIZE

Byte length of the PLC process diagram of the physical inputs.

0x0000F030

0x00000000-

0xFFFFFFFF

R/W UINT8[n] READ_Q - WRITE_Q

PLC process diagram of the physical outputs(%Q field). Offset is byte offset.

0x0000F031

0x00000000-

0xFFFFFFFF

R/W UINT8 READ_QX - WRITE_QX

PLC process diagram of the physical outputs(%QX field). The index offset contains the bit address which is calculated from the byte number *8 + bit number.

0x0000F035

0x00000000 R ULONG ADSIGRP_IOIMAGE_ROSIZE

Byte length of the PLC process diagram of the physical outputs.

0x0000F080

0x00000000-

0xFFFFFFFF

= n (number of internal sub-commands)

R&W
W:
n * ULONG[3] :=
IG1, IO1, Len1,
IG2, IO2, Len2,
...,
IG(n), IO(n), Len(n)

R:
n * ULONG
+ UINT8[Len1]
+ UINT8[Len2]
+ ...,
+ UINT8[Len(n)] :=
Result1, Result2, ..., Result(n),
Data1, Data2, ..., Data(n)

ADSIGRP_SUMUP_READ

The write-data contains a list of multiple, separate AdsReadReq(IG, IO, Len, Data) sub-commands.

The read-data contains a list of return codes followed by the requested data.

PLC / IO implemented in TwinCAT v2.10 Build >= 1324
0x0000F081

0x00000000-

0xFFFFFFFF

= n (number of internal sub-commands)

R&W
W:
(n * ULONG[3])
+ UINT8[Len1]
+ UINT8[Len2]
+ ...,
+ UINT8[Len(n)] :=
IG1, IO1, Len1,
IG2, IO2, Len2,
...,
IG(n), IO(n), Len(n),
Data1, Data2, ..., Data(n)

R:
n * ULONG :=
Result1, Result2, ..., Result(n)

ADSIGRP_SUMUP_WRITE

The write-data contains a list of multiple, separate AdsWriteReq(IG, IO, Len, Data) sub-commands.

The read-data contains a list of return codes.

PLC / IO

implemented in TwinCAT v2.11 Build >= 1550
0x0000F082

0x00000000-

0xFFFFFFFF

= n (number of internal sub-commands)

R&W
W:
(n * ULONG[4])
+ UINT8[WriteLen1]
+ UINT8[WriteLen2]
+ ...,
+ UINT8[WriteLen(n)] :=
IG1, IO1, ReadLen1, WriteLen1,
IG2, IO2, ReadLen2, WriteLen2,
...,
IG(n), IO(n), ReadLen(n), ..., WriteLen(n),
WriteData1, WriteData2, ..., WriteData(n)

R:
(n * ULONG[2])
+ UINT8[ReturnLen1]
+ UINT8[ReturnLen2]
+ ...,
+ UINT8[ReturnLen(n)] :=
Result1, ReturnLen1,
Result2, ReturnLen2,
...,
Result(n), ReturnLen(n),
Read Data1, ReadData2, ..., ReadData(n)

ADSIGRP_SUMUP_READWRITE

The write-data contains a list of multiple, separate AdsReadWriteReq(IG, IO, readLen, writeLen, Data) sub-commands.

The read-data contains a list of return codes and return data length followed by the requested data.

PLC / IO

implemented in TwinCAT v2.11 Build >= 1550