HRESULT

Most methods of the TwinCAT 3 Plastic Technology Functions return information about the success of the execution by means of a HRESULT value. This is formed from individual 16 bits of information and a 16-bit error code. This results in the 32-bit data type. The basic structure is as follows:

Bits

31

30-16

15-0

Meaning

0 = Success, 1 = Error

Characteristic identifier of the Plastic Technology Functions: 0x1B00

Error code: Typically matching the enumeration E_AdsErr

There are several ways to evaluate an HRESULT error code:

See also PLC Programming Conventions - Error Codes