"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