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.

× If you are developing in .NET, but are using the OPC-UA (OPC Unified Architecture), please post in the QuickOPC-UA category instead.

OPC “Classic” (COM/DCOM based) Alarms&Events:

More
14 Apr 2024 10:42 #12724 by support
Hello,
thank you for the additional information.

1. Can you please install the *64-bit* version of OPC Core Components, on the client machine? That is, visit opcfoundation.org/developer-tools/samples-and-tools-classic/core-components/ , download "OPC Core Components Redistributables ...", and after unzipping, start the "OPC Core Components Redistributable (x64) 3.00.108.msi" file.

The reason I am asking for this is because your application runs in a 64-bit process, and most other OPC clients are 32-bits; and, if the OPC Core Components got installed onto your computer by some OPC application, it might have only installed the 32-bit version.

2. If you put breakpoint into the catch handler, what is in the e.Exception.InnerException please?

Best regards

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

More
12 Apr 2024 01:07 #12723 by Romuald

Hello,

Thank you very much for your prompt reply.
And the handle is ; int handle = client.SubscribeEvents("//opcae://192.168.1.61", "CCFTES.OPCEventServer.1/{9787F924-EADE-11D2-B21A-006097CA0286}" 100);

This the full error message.
"*** Failure: 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 'opcae://192.168.1.61'. The server class used was '{9787f924-eade-11d2-b21a-006097ca0286}'.
+ Execution details: HasNativeClient=False, HasNetApiClient=True, ProcessBitness=64.
+ The client method called (or event/callback invoked) was 'Notification'. "

Additionally, I tested the Softing OPC Toolbox Demo client from the remote computer, and it can receive alarms and events but my client does not work.

Please advise.
Thank you
Johan

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

More
11 Apr 2024 22:49 #12722 by Romuald
Hello,

Thank you very much for your prompt reply.
And the handle is ; int handle = client.SubscribeEvents("//opcae://192.168.1.61", "CCFTES.OPCEventServer.1/{9787F924-EADE-11D2-B21A-006097CA0286}" 100);

This the full error message.
"*** Failure: 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 'opcae://192.168.200.61'. The server class used was '{9787f924-eade-11d2-b21a-006097ca0286}'.
+ Execution details: HasNativeClient=False, HasNetApiClient=True, ProcessBitness=64.
+ The client method called (or event/callback invoked) was 'Notification'. "

Additionally, I tested the Softing OPC Toolbox Demo client from the remote computer, and it can receive alarms and events but my client does not work.

Please advise.
Thank you
Johan

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

More
11 Apr 2024 07:33 #12721 by support
Hello.

With this kind of problem, I am tempted to say "welcome to the club". It almost always has to do with DCOM configuration, and DCOM settings in the involved applications (OPC server, OPC client). And it is a source of endless headaches in OPC Classic world.

For start, please figure out what the full error message is. The "[...]" indicates that we have more information, but it was left our because the ".ErrorMessageBrief" property used to report the error intentionally shortens the text.

Can you please
1) replace .ErrorMessageBroef with .ErrorMessage, retest, and post here the full message,
2) even better, place breakpoint at that line, inspect the e.Exception, and post the ocntents here? Specifically, if there is e.Exception.InnerException and so forth, we would like to see them too.

Best regards

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

More
10 Apr 2024 22:53 - 11 Apr 2024 07:28 #12720 by Romuald
Hi,

Good Day!

I am new to OPC. I followed the sample as shown below to build a DCOM Client.
Suppose I run this client on another PC on the same local area network where the server is connected. I get the following error.
“*** Failure: OPC NET API error - result ID: E_NETWORK_ERROR; Could not connect to server. [...]”
But it works if I run it on the same PC where the server application is running. Please advise.
using OpcLabs.EasyOpc.AlarmsAndEvents;
using OpcLabs.EasyOpc.AlarmsAndEvents.OperationModel;
 
// Instantiate the client object.
using (var client = new EasyAEClient())
{
    var eventHandler = new EasyAENotificationEventHandler(client_Notification);
    client.Notification += eventHandler;
 
    int handle = client.SubscribeEvents("192.168.1.61", "CCFTES.OPCEventServer.1", 1000);
 
    Console.WriteLine("Processing event notifications for 1 minute...");
    Thread.Sleep(60 * 1000);
 
    client.UnsubscribeEvents(handle);
}
 
// Notification event handler
static void client_Notification(object sender, EasyAENotificationEventArgs e)
{
    if (!e.Succeeded)
    {
        Console.WriteLine("*** Failure: {0}", e.ErrorMessageBrief);
        return;
    }
    if (!(e.EventData is null))
        Console.WriteLine(e.EventData.Message);
}
Last edit: 11 Apr 2024 07:28 by support.

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

Moderators: support
Time to create page: 0.062 seconds