Overview

The Adapter Diagnostic object presents the instances, attributes and services described below.

Class ID

302 (hex), 770 (decimal)

Instance IDs

The Adapter Diagnostic object presents two instances:

  • 0: class

  • 1: instance

Attributes

Adapter Diagnostic object attributes are associated with each instance, as follows:

Instance ID = 0 (class attributes):

Attribute ID

Description

GET

SET

01

Revision

X

02

Maximum Instance

X

X = supported

— = not supported

Instance ID = 1 (instance attributes):

Attribute ID

Description

Type

GET

SET

Value

hex

dec

01

01

Control Bits

WORD

X

  • 0 = Deactivate (default)

  • 1 = Activate checking time for production and consumption.

02

02

ST_DIAG_CNT

STRUCT of

X

wErrFrameCnt

UINT

Incremented each time a frame is not sent for lack of resources or was impossible to send.

wErrTimeOutCnt

UINT

Incremented when one connection is timed out.

wErrRefusedCnt

UINT

Incremented when one connection is refused by the remote station.

dwProdCnt

UDINT

Incremented at each production

dwConsCnt

UDINT

Incremented at each consumption

dwProdByteCnt

UDINT

Total bytes produced

dwConsByteCnt

UDINT

Total bytes consumed

03

03

Input Status

WORD

X

See below.

04

04

Output Status

WORD

X

See below.

05

05

ST_LINK

STRUCT of

X

CIP Status

UINT

See below.

Extended Status

UINT

See below.

Production Connection ID

DWORD

Consumed Connection ID

DWORD

OtoT API

UDINT

API of the connection

TtoO API

UDINT

API of the connection

OtoT RPI

UDINT

RPI of the connection

TtoO RPI

UDINT

RPI of the connection

06

06

ST_SOCK_PARAM

STRUCT of

X

lpSockId

DWORD

Internal Identifier

IpForeign

DWORD

Remote station IP

wPortForeign

UINT

Remote station port number

IpLocal

DWORD

Local station IP

wPortLocal

UINT

Local station port number

07

07

ST_PRODUCTION

STRUCT of

X

bValid

WORD

  • 0 = STRUCT production data is not valid.

  • 1 = STRUCT production data is valid

dwCurrentTime

UDINT

Internal – Number of ticks before next production

dwProductionTime

UDINT

Internal – Number of ticks between production

SequenceNumber

UDINT

Number of the sequence in the production

stCheckTime

STRUCT of

dwLastTime

UDINT

Internal use

dwMaxTime

UDINT

Maximum time between two productions

dwMinTime

UDINT

Minimum time between two productions

dwRPI

UDINT

API of the connection

wOverRun

UINT

Number of times the production was too long

wUnderRun

UINT

Number of times the production was too fast

dwCurrentTime

UDINT

Internal use

08

08

ST_CONSUMPTION

STRUCT

X

bValid

WORD

  • 0 = STRUCT consumption data is not valid.

  • 1 = STRUCT consumption data is valid

dwCurrentTime

UDINT

Internal – Number of ticks before timeout

dwconsumptionTime

UDINT

Internal – Number of ticks of the timeout

SequenceNumber

UDINT

Number of the sequence in the consumption

stCheckTime

STRUCT

dwLastTime

UDINT

Internal use

dwMaxTime

UDINT

Maximum time between two consumptions

dwMinTime

UDINT

Minimum time between two consumptions

dwRPI

UDINT

API of the connection

wOverRun

UINT

Number of times the consumption was too long

wUnderRun

UINT

Number of times the consumption was too fast

dwCurrentTime

UDINT

Internal use

09

09

ASM Status

STRUCT of

See below.

byGeneralStatus

BYTE

byReserved

BYTE

Extended Status

WORD

X = supported

— = not supported

Adapter Diagnostic status values include the following:

Status Description CIP Status Extended Context

0

OK

0

0

The IO data are correctly exchanged

54

Connection in progress

0

0

The connection is in progress, but the IO data are not consumed yet.

33

No connection

0

0

No connection

0xFB

0xFB01

Connection in timeout

0xFB

0xFB07

Optimization error / indeterminable MAC address

0xFB

0xFB0B

Timeout on consumption

0xFB

0xFB0C

Connection closed by a forward close

0xFB

0xFB0E

Module in STOP

0xFD

Status

Error from Encapsulation layer

0xFE

TCP Error

Error on TCP connection

0x02

0

No more resource to handle the connections

0x20

0

Connections refused because of incorrect format or parameters

53

IDLE

0

0

A notification of IDLE is received

Services

The Adapter Diagnostic object performs the following services upon the listed object types:

Service ID

Description

Class

Instance

Notes

hex

dec

01

01

Get_Attributes_All

X

X

Returns:

  • all class attributes (instance = 0)

  • instance attributes 1 to 7 (instance = 1)

61

97

Get_Output

X

Returns the status and value the output:

  • Offset 0 / UINT / Status

  • Offset 2 / USINT [0...409] / Output data

62

98

Get_Input

X

Returns the status and value the input:

  • Offset 0 / UINT / Status

  • Offset 2 / USINT [0...409] / Intput data

63

99

Set_DiagCounters

X

Sets the values of:

  • ST_Diag_CNT to 0.
    ...and...

  • ST_CHECK_TIME – both production and consumption –to 0 (but not the fields dwLastTime and dwCurrentTime)

X = supported

— = not supported

NOTE: If a service is addressed on an instance that does not exist, the service detects the following error: 0x05 – Path destination unknown.