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.

Connecting to Kepware Server

More
26 Jan 2015 19:40 #2648 by support
I am glad that it works. It indicates, however, that there is a problem with getting callbacks from the server, which may eventually bite at other places (namely, subscriptions). It may still have to do with DCOM settings. If you run into further issues in this area, let me know, and we will try to get closer to the real cause.

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

More
26 Jan 2015 13:27 #2641 by sethmo
Replied by sethmo on topic Connecting to Kepware Server
Thanks, that worked! I can now access the tags on my Kepware server.

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

More
26 Jan 2015 07:46 #2639 by support
The error is essentially a timeout (set to 1 minute by default; configurable).

Can you please place this at the beginning of your code? The idea is to enforce synchronous OPC calls, in case there is an issue with remote callbacks.
EasyDAClient.SharedInstance.InstanceParameters.Mode.AllowAsynchronousMethod = false;
Thank you

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

More
23 Jan 2015 17:20 #2635 by sethmo
Replied by sethmo on topic Connecting to Kepware Server
It is a remote server. I can access the tags through the Kepware Quick Client on my PC which usually means DCOM is setup properly, but when I try to access a tag through the code you posted, the application hangs and eventually spits out the below error:

A first chance exception of type 'OpcLabs.EasyOpc.OperationModel.OpcException' occurred in OpcLabs.EasyOpcClassicInternal.dll
An unhandled exception of type 'OpcLabs.EasyOpc.OperationModel.OpcException' occurred in OpcLabs.EasyOpcClassicInternal.dll
Additional information: An OPC operation failure with error code -1073430509 (0xC004C013) occurred, originating from 'OpcLabs.EasyOpcRaw.DataAccess.RawEasyDAClient'. The inner exception contains details about the problem.

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

More
14 Jan 2015 16:58 #2609 by support
The ProgID of the KepServerEX is (depending on the version) e.g. "Kepware.KEPServerEX.V5".
The OPC Item IDs depend on how you configure the server, and is therefore impossible to specify them without knowing the configuration. They may look like "Channel1.Device1.Tag1". If you post the configuration here, I can tell then. Or, you can use the browsing features, and retrieve the ItemIDs from the server itself.

A code for simple reading from the Kepware server may look like this:
// Read item value and display it in a message box 
MessageBox.Show(EasyDAClient.SharedInstance.ReadItemValue(
    "", "Kepware.KEPServerEX.V5", "Channel1.Device1.Tag1").ToString());

This is for the Kepware server that resides on the same computer as the client app. If it is remote, replace the first empty string by the computer name. Note that for this to work, DCOM has to be configured properly, which is a complicated matter.

Besides, what error message are you getting?

Best regards

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

More
14 Jan 2015 16:51 #2608 by support
From: OPC Labs Contact Form - S.
Sent: Wednesday, January 14, 2015 5:47 PM
To: Zbynek Zahradnik
Subject: OPC Labs Contact Form - Connecting to Kepware Server

Connecting to Kepware Server

We are looking into a way to program a .NET c# application to display live tags out of our Kepware server. I downloaded the trial of OPCLabs .NET and have started to look at some of the Example c# code but have not been successful in subscribing to items on our Kepware server. Could you provide me with a small c# sample code for the connection string needed to connect to items on a Kepware server?

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

Moderators: support
Time to create page: 0.055 seconds