This section describes the handling of ISDU errors (ErrorTypes). IO-Link Errors are not to be confused with IO-Link Events.

There are two ways how this OPC UA Mapping can trigger IO-Link ISDU requests:

  1. Executing some OPC UA Methods (like ReadISDU, WriteISDU, SystemCommand, etc.).
  2. Reading or writing some OPC UA Variables (which trigger an ISDU request).

In both access ways an ISDU request can fail and IO-Link will respond with an ISDU error. In case of error the OPC UA Service response (of Services like Read, Write or Call) should contain information about the error in diagnosticInfos[] as specified in the following paragraphs. If an ISDU error occurs and the ISDU request was triggered with an OPC UA Method, the output parameter "ErrorType" contains the raw ISDU error as well.

NOTE To get content in the field diagnosticInfos[] an OPC UA Client has to indicate in the OPC UA Service RequestHeader that diagnostic info associated with the operation of the Service has to be returned. This is done by setting the appropriate bits of returnDiagnostics, a field of the OPC UA Service RequestHeader. (See OPC 10000-4 for more details).

If an ISDU error occurs the OPC UA Service Response array diagnosticInfos[] shall contain at least one element of DataType DiagnosticInfo.

The following rules apply to fill the fields of the DiagnosticInfo structure. The DiagnosticInfo structure does not contain the Strings itself (except additionalInfo), but an index of the position of the String in the stringTable.

Table 70 – Mapping of ISDU Errors in DiagnosticInfo

DiagnosticInfo structure element

ISDU Error related description

example

namespaceUri

IO-Link ErrorType Namespace

"http://opcfoundation.org/UA/IOLink/"

symbolicId

Error Code and Additional Code as 4-digit hex number

"0x8012"

locale

Locale of localizedText

"en"

localizedText

String that describes the symbolicId

"Subindex not available"

additionalInfo

Vendor-specific diagnostic information

""

The field namespaceUri contains the IO-Link ErrorType Namespace: "http://opcfoundation.org/UA/IOLink/".

The field symbolicId contains the IO-Link Error Code and Additional Code (as described in the IO-Link Specification) as 4-digit hex number converted to a String.

The field locale contains the country and region description of the language that is used in localizedText.

The field localizedText contains a verbal description of the error codes (symbolicId).

Note: This is a String, but not the built-in OPC UA DataType LocalizedText! The content of localizedText is specified in 14.4.

The content of additionalInfo is specified in 14.4.

If the combination of IO-Link Error Code and Additional Code is listed in the IO-Link Specification, the sever shall use the text of Table C.1 or Table C.2 in column "Incident" as localizedText. Default locale is "en". Servers may provide vendor-specific translations to other languages. (In this case they have to adjust the value of locale as well.)

If the combination of IO-Link Error Code and Additional Code is vendor-specific (0x8101 to 0x81FF) no string shall be provided at all. This is indicated by giving stringTable index -1 as localizedText.

The content of additionalInfo is vendor-specific, but usually an empty string.

If the combination of IO-Link Error Code and Additional Code is listed in the IODD StandardDefinitions (see IODD Specification), the server shall use text specified there with the appropriate locale as localizedText. Servers may provide vendor-specific translations to other languages. (In this case they have to adjust the value of locale as well.)

If the combination of IO-Link Error Code and Additional Code is vendor-specific (0x8101 to 0x81FF) the IODD should contain an entry in its ErrorTypeCollection.

  • If the IODD does not contain a corresponding entry in its ErrorTypeCollection no string shall be provided at all. This is indicated by giving stringTable index -1 as localizedText. Note: IODDs following IODD Specification 1.0.1 do not have an ErrorTypeCollection at all.
  • If the IODD contains a corresponding entry in its ErrorTypeCollection, the localizedText contains the text referenced by the XML property "Name" of the XML element "ErrorType". The additionalInfo contains the text referenced by the XML property "Description" of the XML element "ErrorType", if the description is available. In all other cases the content of additionalInfo is vendor-specific, but usually an empty string.

As a result of this, the StdErrorTypeRef elements of the ErrorTypeCollection in the IODD might be ignored by the OPC UA server.