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.

Compatibility and Functionality Issues with QuickOPC at DeltaV Sites

More
28 Oct 2024 06:41 #13248 by support
Hello.

I would like to say as a foreword, that without having a reproducible scenario here locally, all my replies would be in the realm of "try this because it is related, and see what happens", not a targeted advise given with knowledge how to reliably resolve the problem, I hope you will understand.

1. Unless you have a specific reason for the "EnableNativeClient = false" setting, please remove when using recent QuickOPC versions (did OPC Labs recommend it to you, or did you copy it from recommendation to another client's issue?) This setting can also explain the difference you are now seeing between Connectivity Explorer, and your own application, when connecting through OPC Analyzer.

2. Make sure that the latest version of OPC Core Components (from www.opcfoundation.org ) is installed on both client and server machines. On 64-bit machines, it must be the 64-bit version of OPC Core Components!

3. I was reviewing the discussion we had so far, and I realized I still miss a clear answer to one of my questions, and it is quite important. It is the question #2 from Oct 13, where I asked "
What do you mean by "…cause connectivity problems"? What precisely happens? Is it the "Specified method is not supported", or is that a separate issue? Why would you call it a connection problem if it happens only with some items?" and you replied "I apologize for the unclear language in my post. What I meant by connection issues was that ALL read tags seem to fail when the ReadMultipleItems method is called on DeltaV sites with version 5.80.293 and the tag address I provided was just an example." What is still not clear to me is *how* do these tags fail - what is the error message?

I have some more hints up my sleeve (before I forget: a) CLSID, b) write methods), but I'd like to hear you answer first, because what I have in mind may not apply, depending on it.

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

More
25 Oct 2024 05:09 #13245 by support
Hello.

I am currently travelling and will reply by Monday. I apologize for the delay.

Regards

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

More
23 Oct 2024 09:49 #13234 by FAnsariCMC
Hello,

This is our initialization logic:
public QuickOPC_DaServerMgtWrapper()
        {
            //Addresses DCOM hardening changes by Microsoft CVE-2021-26414
            ComManagement.Instance.Configuration.SecurityParameters.EnsureDataIntegrity = true;
            ComManagement.Instance.AssureSecurityInitialization();
 
            _daServerMgt = new EasyDAClient();
            //Increase timeout for connections
            _daServerMgt.InstanceParameters.Timeouts.WriteItem = 6000;
            _daServerMgt.InstanceParameters.Timeouts.ReadItem = 6000;
            _daServerMgt.InstanceParameters.HoldPeriods.TopicRead = 200;
            _daServerMgt.InstanceParameters.HoldPeriods.TopicWrite = 200;
 
            //This line was recommended to force usage of their underlying rewrite for the DA Client
            _daServerMgt.InstanceParameters.EnableNativeClient = false;
 
            _daServerMgt.ItemChanged += ServerStateChanged;
        }

We are setting up EnableNativeClient as false, I had done this a year ago due to a recommendation I saw on another forum post here. Please let me know if this should be set to True and if EnableNetApiClient should also be set to a value?

The application running our communication service is a WCF console app that runs as a windows service.

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

More
22 Oct 2024 04:26 #13226 by support
Hello,
thank you for the additional information. The behavior is somewhat strange, but still it brings some new information.

First of all, are you setting properties in QuickOPC like EnableNativeClient, EnableNetApiClient anywhere in your code?

The reason I am asking is because if you do *not*, the error message actually implicates that you are running your program under .NET Core or .NET 5+, which would mean a big difference in QuickOPC, because the underlying low-level OPC Classic code is different.

Also, what type of application you have? Such as desktop app, console app, WIndows service, Web service, Web app etc.? (asking because of DCOM).

Regards

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

More
20 Oct 2024 12:03 #13224 by FAnsariCMC
Just a few corrections:

1. I gave the example of one tag not connecting, but there were 3 different tags I was testing (including a write-tag) and they all gave the same error.
2. I meant Kepware quickclient and not quickopc client.

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

More
20 Oct 2024 11:37 #13223 by FAnsariCMC
Hello,

Thank you for providing us with the link to the OPC Analyzer. We are coordinating with our client's IT department to get these logs to you ASAP.

In the meantime, I was working with the OPC Analyzer with our local test-bed to see if I could get it to work there first by following the instructions provided and noticed another odd issue. The DA client in our application throws this error when trying to connect to the OPC Analyzer:

Tag 'ItemId="Channel1.Device1.4224FI492"': OPC NET API error - result ID: E_NETWORK_ERROR; Could not connect to server.
+ This error may be caused by damaged or missing OPC Server registration on the specified computer.
It can also be due to a problem with OPC proxies/stubs, which can be resolved by installing OPC Core Components (from OPC Foundation).
+ The machine name was ''.
+ The server class used was 'OpcTestLab.OpcAnalyzer.1'.
+ Execution details: HasNativeClient=False, HasNetApiClient=True, ProcessBitness=32.
+ The client method called (or event/callback invoked) was 'ReadMultipleItems[3]'.


For reference, the actual tag address is localhost/Kepware.KEPServerEX.V6/Channel1.Device1.4224FI492, which our software has no trouble connecting to.

Furthermore, both QuickOPC Client and OPC Lab's Connectivity Explorer showed no issues when connecting to the OPC Analyzer intermediary server. I also made sure that they were all running under the same user with admin rights to take DCOM issues out of the equation. This was all tested on the same machine, so there shouldn't be any network issues affecting the result.

Could this be an issue with how we are initializing the connection to the server or the QuickOPC version being used (5.63.246)?

Thank you

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

More
15 Oct 2024 11:57 #13221 by support
Hello,
thank you for additional information.

Regarding the "Specified method is not supported", it is probably not from us, but in order to figure it out, please obtain the call stack contained in the exception, it should tell you more (or post it here).

I will send you a download link for the OPC Analyzer to the email address you used to register with the forums. Make sure you understand and observe the conditions of use.

Please read this:
- kb.opclabs.com/Collecting_information_for_troubleshooting
- kb.opclabs.com/How_to_use_OPC_Analyzer

Ideally we would like to always obtain traces for the "working" and "non-working" scenario (e.g. the Write with other client versus the Write with QuickOPC).

Regarding your question about async in WriteMultipleItemValues: To you (the caller of this method), it always works synchronously. Under the hood, it can be either sync or async. If it is async, QuickOPC waits for the completion callback so it looks like sync to you. There is a way to influence which one is used, but I'd rather wait to see what OPC Analyzer tell us, because the sync/async difference what just a wild guess, just one of the possiblities.

Best regards

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

More
13 Oct 2024 15:13 #13219 by FAnsariCMC
Hello,

Thank you for the prompt response.

A.

1) We are targeting .NET Framework 4.8

2) I apologize for the unclear language in my post. What I meant by connection issues was that ALL read tags seem to fail when the ReadMultipleItems method is called on DeltaV sites with version 5.80.293 and the tag address I provided was just an example.

3) The error message we got was "Specified method is not supported". When I was looking into this error message, it did seem like the error message was not actually being returned from the QuickOPC API itself but the result of the try-catch failing when the ReadMultipleItems was called, so I understand if this is not something that can be identified on your end and may be an issue with our implementation.

B.

1) I understand and fully agree, as we have not encountered these specific issues outside of the DeltaV sites.
2) Thank you for the explanation, is WriteMultipleItemValues an async method under the hood or sync? Or is there another method for writes that is async so we can try that as a possible solution?
3) We would really appreciate that. Could you please provide me with a link to this software?
4 and 5) I understand and agree.
6) I see, that is good to know. It may just be an issue with our upgrade process as we had multiple issues with certain assemblies that were added for later versions of QuickOPC not being replaced/properly upgraded as dependencies for our service.

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

More
13 Oct 2024 13:13 #13218 by support
Hello.

A. I would like to get some clarifications, and more information please.

1. Are you targeting .NET Framework (4.7.x, 4.8.x), or .NET 6+ ?
2. What do you mean by "…cause connectivity problems"? What precisely happens? Is it the
"Specified method is not supported", or is that a separate issue? Why would you call it a connection problem if it happens only with some items?
3. Please provide and precise error message for "Specified method is not supported". We do not have such error anywhere in our software, so it either comes from the server and must be enclosed in some text of our own, or it is not the precise and full error you are getting.


B. Info for you to know from our side.

1. DeltaV software, in OPC terms (both Classic and UA), is problematic.
2. When the write operation succeeds in QuickOPC, it means that the server has reported to QuickOPC that it had succeeded. I can tell with certainty that this is not QuickOPC problem. The fact that it works through other OPC client may be due to valid client-side differences. The are multiple methods to do the Write (such as sync/async), so if one works and one is buggy in the server, and we happened to use the buggy one, you would see this difference. We can try to use OPC Analyzer (capture the communication) to figure out more, if you are willing/able to do that.
3. We can also try to use OPC Analyzer to troubleshoot the connection issues.
4. However, using OPC Analyzer sometimes fails because 1) it only supports a subset of OPC specifications, and 2) putting it in the middle sometimes changes the behavior.
5. The only efficient way to tackle this would be if we had a reproducible scenario on our side.
6. I am also not aware of a specific code change that could explain the difference in behavior between the two QuickOPC versions. But this is not to say that there cannot be some.

Best regards

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

More
12 Oct 2024 12:04 #13217 by FAnsariCMC
Dear QuickOPC Support Team,

We're experiencing several issues with QuickOPC, particularly in DeltaV environments. Here's a summary of our observations and concerns:

1. Version Compatibility:
- Versions beyond 5.63.246 cause connectivity problems, specifically at DeltaV sites.
- The last tested version (5.80.293) refuses to connect/browse DeltaV servers.
- Error message with 5.80.293: "Specified method is not supported" for tags like 'ItemId="FIC701-2/PID1/PV.CV"'.

2. Current Workaround:
- Reverted to QuickOPC 5.63.246 for our latest release.
- Implemented a direct poll legacy mode to handle connectivity issues using a quartz schedular to poll on a specified interval.
- Version 5.63.246 works as expected with our workaround for reading tags.

3. Tag Writing Issues:
- With version 5.63.246, writing tags doesn't work at all (on DeltaV sites only, no issues with other sites).
- Write operations appear to complete successfully on our side with no error messages.
- However, the OPC Server tags never get updated with these values.
- In contrast, writing through Kepware's OPC Quick client successfully updates the tags.
- We haven't tested tag writing with newer versions due to the connection issues.

4. Ongoing Concerns:
- Direct polling encountering errors with versions above 5.63.246.
- Unable to establish subscriptions at these DeltaV sites. (not a huge concern as our workaround seems to be working well)
- Our workaround for reading tags functions correctly with 5.63.246 but fails with newer versions.

5. Security Considerations:
- Using an older version means missing out on latest security updates and features.

For reference here are some relevant snippets from our communication driver:
public override void Initialize()
{
    base.Initialize();
 
    // [Initialization of _daServerMgtWrappers and other non-QuickOPC specific setup]
 
    foreach (var group in /* [Group setup] */)
    {
        // [Setup of readTags, writeTags, etc.]
 
        var daServerMgtWrapper = new QuickOPC_DaServerMgtWrapper()
        {
            MachineName = group.FirstOrDefault().MachineName,
            OpcServerName = group.FirstOrDefault().OpcServerName,
            Url = url,
            ReadTags = readTags,
            ReadTags_Identifiers = readTagIdentifiers,
            WriteTags = writeTags,
            _revisedUpdateRate = int.Parse(this._driverSettings["Subscription Update Rate"].Value),
            _percentDeadband = float.Parse(this._driverSettings["Subscription Deadband"].Value)
        };
 
        Task.Run(
            () =>
            {
                if (daServerMgtWrapper.TryBrowse() && daServerMgtWrapper.TrySubscribe())
                {
                    daServerMgtWrapper._daServerMgt.ItemChanged += OnDataChanged;
                    // [LicenseCheck call]
                }
                else
                {
                    // [Error handling for connection failure]
                }
            }
        );
        this._daServerMgtWrappers.Add(daServerMgtWrapper);
    }
 
    // [Error logging]
}
 
public QuickOPC_DaServerMgtWrapper()
{
    //Addresses DCOM hardening changes by Microsoft CVE-2021-26414
    ComManagement.Instance.Configuration.SecurityParameters.EnsureDataIntegrity = true;
    ComManagement.Instance.AssureSecurityInitialization();
 
    _daServerMgt = new EasyDAClient();
    //Increase timeout for connections
    _daServerMgt.InstanceParameters.Timeouts.WriteItem = 6000;
    _daServerMgt.InstanceParameters.Timeouts.ReadItem = 6000;
    _daServerMgt.InstanceParameters.HoldPeriods.TopicRead = 200;
    _daServerMgt.InstanceParameters.HoldPeriods.TopicWrite = 200;
 
    //This line was recommended to force usage of their underlying rewrite for the DA Client
    _daServerMgt.InstanceParameters.EnableNativeClient = false;
 
    _daServerMgt.ItemChanged += ServerStateChanged;
}
 
public bool TryBrowse()
{
    ServerElementCollection serverElements;
    ProblematicTagsCount = new List<string>();
 
    try
    {
        serverElements = _daServerMgt.BrowseServers(MachineName);
        //check if OPC Server Exists in the specified machine and return false if not
        for (int i = 0; i < serverElements.Count; i++)
        {
            if (serverElements[i].ProgId.Contains(OpcServerName))
            {
                // [Setup for tag verification]
 
                DAVtqResult[] vtqResults = _daServerMgt.ReadMultipleItems(OpcServerName, tagNames);
 
                // [Checking for problematic tags and logging]
 
                HasConnection = true;
                return true;
            }
        }
 
        Logger.Log(LoggingLevel.Error, $"Specified OPC Server: {OpcServerName} does not exist on the Machine: {MachineName}");
        HasConnection = false;
        return false;
    }
    catch (OpcException opcException)
    {
        HasConnection = false;
        Logger.Log(LoggingLevel.Error, opcException.GetBaseException().Message + $": {MachineName}");
        return false;
    }
}
 
public DAVtqResult[] Read()
{
    DAVtqResult[] vtqReadResults = _daServerMgt.ReadMultipleItems(OpcServerName, ReadTags_Identifiers);
    List<string> errorMessages = new List<string>();
 
    for (int i = 0; i < vtqReadResults.Length; i++)
    {
        if (!vtqReadResults[i].Succeeded)
        {
            string errorMessage = $"Tag '{ReadTags_Identifiers[i]}': {vtqReadResults[i].ErrorMessageBrief}";
            errorMessages.Add(errorMessage);
            Console.WriteLine($"{OpcServerName}: vtqResults[{i}] *** Failure: {vtqReadResults[i].ErrorMessageBrief}");
        }
    }
    return vtqReadResults;
}

We'd appreciate your insights on:
1. Why are these compatibility issues occurring with newer versions, particularly in DeltaV environments?
2. What could be causing the tag writing problem with version 5.63.246, and how can we resolve it?
I have tried scouring through the change log for most versions above 5.63.246 but cannot find any significant changes made to how the connection logic works for DA.
3. Are there any plans to address these DeltaV-specific issues in future releases?
4. Can you provide any recommendations for upgrading while maintaining compatibility and full functionality with DeltaV systems?

Thank you for your assistance in resolving these critical issues.

Best regards,
Fahad

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

Moderators: support
Time to create page: 0.074 seconds