Server error code descriptions
How do I get a description from an error code?
In the OPC Quick Client or other OPC clients, you may see an HRESULT error code like (HR=...), where the "..." is an 8-digit hexadecimal number.
If your client application shows a long negative number like -2147024891, you can use the Windows Calculator (View ⇒ Scientific option) to convert the number to hexadecimal. Be sure to include the "-" sign when entering the negative number.
To look up the text for the error code:
- Bring up a TOP Server window (a demo copy is fine).
- Click the New Project icon if you want. This will save time in the next step.
- Click the OPC Quick Client icon in the TOP Server toolbar. The Quick Client will auto-build its own project from the server project.
- In the Quick Client, in the upper-left window pane, find the server connection icon (labeled SWToolbox.TOPServer or SWToolbox.TOPServer.v5).
- Right-click the server connection icon and choose Get Error String... to open a Get Error String window.
- In the "Error Code:" field, enter a digit 0 and a letter x, then the 8-digit hex number. Example: 0x80070005
- Click Apply. The error text will appear in the "Error Description:" field.
The same procedure can be used to look up an error code from any OPC DA compliant server. Many HRESULT error codes have the same meaning in all OPC DA servers. Other codes are proprietary to one vendor's servers.
(Step 3 works only with TOP Server. For servers that don't support the Quick Client auto-browsing of tags, you can just start the Quick Client from the Windows Start menu and then use the green toolbar button in the Quick Client to connect manually to the server. The Get Error String option should immediately be available as in step 5 - you should not need to add a group to the server.)