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.

Changing property name in Live Mapping

More
10 Mar 2014 13:48 - 10 Mar 2014 16:35 #1763 by support
If I understand it correctly, all you want to do at this point is to change the name of the property in C#, while the physical Item ID in the OPC Server remains the same. I.e. the C# property would be named "Outputs", while the OPC ItemID still ends with ".Output".

To do this, it should be sufficient to provide the (last element of) BrowsePath, as you have already done. The code would look like this:

    // Boilers.Boiler #1.Drum1001.LIX001.Output //Item ID path
    [DANode(BrowsePath = "Output")]
    [DAItem]
    public virtual double Outputs
    {
        get
        {
            return this._output;
        }
        set
        {
            this._output = value;
            this.Notify("Output");
        }
    }

The AccessPath is not the right thing to use. AccessPath is a rarely used additional info to the OPC Server (very few servers actually use it), to specify HOW the item should be accessed. If you really wanted to specify the "Boilers.Boiler #1.Drum1001.LIX001.Output", you would use the ItemId named argument of the DANode attribute.

Please let me know if the suggested code works. If not, please specify precisely which version/build of QuickOPC you are testing with, as some builds did have a bug in this area.

Best regards
Last edit: 10 Mar 2014 16:35 by support. Reason: added missing [DAItem]

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

More
10 Mar 2014 13:38 - 10 Mar 2014 13:38 #1762 by support
From: P.
Sent: Monday, March 10, 2014 1:30 PM
To: Zbynek Zahradnik
Subject: OPC DAClient Access

{translated}

This works for me:
    // Boilers.Boiler #1.Drum1001.LIX001.Output – ItemID
    [DANode()]
    [DAItem()]
    public virtual double Output
    {
        get
        {
            return this._output;
        }
        set
        {
            this._output = value;
            this.Notify("Output");
        }
    }

I have changed the name of the property to Output ->Outputs (resp. I do not want to have special characters, spaces, ... in the name of the variable)
    // Boilers.Boiler #1.Drum1001.LIX001.Output //Item ID path
    [DANode(BrowsePath = "Output")]
    [DAItem(AccessPath = "Boilers.Boiler #1.Drum1001.LIX001.Output")]  - does this have to be entered? If so, how?
    public virtual double Outputs
    {
        get
        {
            return this._output;
        }
        set
        {
            this._output = value;
            this.Notify("Output");
        }
    }
Last edit: 10 Mar 2014 13:38 by support.

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

Moderators: support
Time to create page: 0.051 seconds