Professional OPC
Development Tools

logos

Online Forums

Technical support is provided through Support Forums below. Anybody can view them; you need to Register/Login to our site (see links in upper right corner) in order to Post questions. You do not have to be a licensed user of our product.

Please read Rules for forum posts before reporting your issue or asking a question. OPC Labs team is actively monitoring the forums, and replies as soon as possible. Various technical information can also be found in our Knowledge Base. For your convenience, we have also assembled a Frequently Asked Questions page.

Do not use the Contact page for technical issues.

Testing for OPC operation errors in Live Mapping

More
11 Mar 2014 14:56 - 11 Mar 2014 15:02 #1767 by support
If you are using the Live Mapping model, and there is an OPC operation error, members mapped with the default mapping kind (i.e. Value) will not "see" the error. This is by design.

In order to troubleshoot OPC operation errors with Live Mapping, you can create additional mapping member(s), and in their [DAItem] attribute, set their Kind to one of the following values:
  • ErrorCode: Map the error code, as int. Zero for success, negative values for errors, and positive values for warnings.
  • Exception: Map the exception, as Exception or a derived type. null if the operation has been successful.
  • ErrorMessage: Map the error message, as string. An empty string if the operation has been successful.
  • StatusInfo: Map the status information, as StatusInfo.

These mapping kinds are all based on the same information, the one that is provided in the Exception. The remaining mapping kinds are just shortcuts to an Exception pre-processed in various ways.

The mapped member for the exception may then look similar to this:

    [DANode(BrowsePath = "Output")]
    [DAItem(Kind = DAItemMappingKind.Exception)]
    public Exception OutputException
    {
        get
        {
            ...
        }
        set
        {
            ...
        }
    }
Last edit: 11 Mar 2014 15:02 by support.

Please Log in or Create an account to join the conversation.

Moderators: support
Time to create page: 0.052 seconds