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.

New Development Environment Install Errors

More
08 Oct 2024 14:10 #13213 by support
No problem. To me it looks like there is something peculiar about this OPC server installation program which make it dependent on the installation order, or something similar.

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

More
08 Oct 2024 12:17 #13211 by tlaford
Thank you again for the reply.

I uninstalled and reinstalled the libraries/programs and everything worked. I don't understand why it doesn't work on the first try... but it is resolved now.

Thank you for your help and sorry to have wasted your time.
The following user(s) said Thank You: support

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

More
08 Oct 2024 06:06 - 08 Oct 2024 06:06 #13208 by support
Hello,
thank you for the additional information.

This looks most probably like that the OPC server is not properly installed. I will give you some additional questions again:

1. Do you have other OPC clients on your new computer that you can use to test connection to this server?

2. What happens if you change "localhost" to just an empty string ("")?

3. From the Launcher, start Tools -> OPC Command-line Tool (Interactive Mode), and then enter the command below, and post here the output:
daClient browseServers

Funny enough, you have had this problem years ago too: opclabs.com/forum/general-issues/2269-class-not-registered-error - also see the resolution there.

Best regards
Last edit: 08 Oct 2024 06:06 by support.

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

More
07 Oct 2024 12:53 #13206 by tlaford
Thank you for the reply.

1) I am developing in Visual Studio 2017 in C-Sharp using OPC Studio 2024.1

2) Here is a very simple example of where the error occurs:

EasyDAClient client = new EasyDAClient();

// Error occurs on this READ call
object value = client.ReadItemValue("localhost","mahlo.10AOpcServer.1", "MyMachine.Current.KeyName");

This snippet is based on THIS demo code.

3) The exception is:

An OPC operation failure with error ID '{opcfoundation.org/DataAccess/}E_FAIL.0x800401F3' occurred, originating from '' and with depth of 1. The inner exception contains details about the problem.

The Inner Exception is:

Invalid class string\r\n+ This error usually means that the ProgID of the OPC Server you used is not registered on the specified computer.\r\n+ The machine name was 'localhost'. The server class used was 'mahlo.10AOpcServer.1'.\r\n+ Execution details: HasNativeClient=False, HasNetApiClient=True, ProcessBitness=32.\r\n+ The client method called (or event/callback invoked) was 'ReadMultipleItems[1]'."} System.Exception {OpcLabs.BaseLib.Runtime.InteropServices.ExtendedCOMException}


4) The IP address of the production equipment I am trying to access has not changed. I setup my localhost version of the mahlo 10A OPC-server on my new development computer with the same configuration as I had with the old development computer.

I was able to retrieve my old computer temporarily and I confirmed that this simple read demo works just fine. So I must have forgotten something when installing. Your help is greatly appreciated.

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

More
05 Oct 2024 09:39 #13204 by support
Hello,
I have some additional questions:

1. What programming language/tool you are using?
2. On which code line/method call you are getting the error? ideally, share the piece of code here.
3. Is the "Invalid class string" the whole message, or is there more to it?
4. Where is you target OPC server located? Is it always local at the machine where you are developing? Or it is on some remote machine? If so, is it my correct understanding that you are connecting to the same machine and server from your original and new development machine?

Best regards

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

More
04 Oct 2024 17:28 #13203 by tlaford
My install of OPC Studio 2024.1 was working just fine, but then they told me "my lease expired" and I needed to move all my development onto a new computer. So I followed these steps:

1) I installed OPC Studio 2024.1
2) I installed my license
3) I activated my OPC Gateway program
4) I confirmed that my OPC Gateway program was reporting connection and data transmission from the device
5) I ran my program and got a "Class not registered" error
6) I installed OPC Core Components
7) I ran my program again and got an "Invalid class string" error message.
8) I verified that my MACHINE NAME, SERVER CLASS, and ITEM ID are the same as they have always been.

So what did I forget?
How do I resolve an "Invalid class string" error message for a program that was working on my old development machine?

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

Moderators: support
Time to create page: 0.056 seconds