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.

OPC UA COM C++

More
12 Dec 2022 15:56 #11327 by support
Replied by support on topic OPC UA COM C++
Hello.

QuickOPC does the session management automatically. See the User's Guide. You can start right away with "ReadValue", this is correct.

I will provide the code you asked for, but give me some time. Also, it will be tested with 2022.2 and on supported systems. It may or may not work with older versions and on unsupported systems..

Best regards

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

More
12 Dec 2022 15:44 #11326 by simona.magni@growermetal.com
Hello, it is a runtime error.
I also downloaded version 2022.2 but I have a window7 and it doesn't work.
I thought it should still work.
I try to redo the work with the new version on another machine.
But am I missing a piece of code? Don't I have to open a session with the UA server first? I don't know how to do it.
Simona

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

More
12 Dec 2022 15:31 #11325 by support
Replied by support on topic OPC UA COM C++
Hello.

Can you please provide full error information - ideally a screenshot of what you are getting. Ys this a compiler error? Or is it a runtime error?

Also, is there a reason why you have chosen such an old version (2019.2), and can you switch to the current one (2022.2)? In any case, we can only give support on this and provide code for the current version, 2022.2.

Best regards

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

More
12 Dec 2022 15:22 #11324 by simona.magni@growermetal.com
I installed QuickOPC-2019.2 and tried to use the SDK libraries.
My programming tool is visual studio 6.0, and I was able to compile this code without errors to read a variable:

CoInitialize(NULL);
_EasyUAClient Client=_EasyUAClient();
COleVariant varName = ClientPtr->ReadValue( "opc.tcp://10.100.4.10:4840","nsu=http://ewon.biz/Ewontags/ ;ns=4;i=2002");

but it gives me an error. "invalid variable type"

What am I missing?
Could you send me a working code to read and write a UA server using your SDK libraries?
Thank you
Simona

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

Moderators: support
Time to create page: 0.049 seconds