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.

vb6 connection parameters

More
15 Sep 2021 10:04 #10223 by support
Replied by support on topic vb6 connection parameters
Hello,

the prompt can be suppressed using some settings, and we can discuss that, but that is definitely not the secure way of handling it. Because if you do that, your client would happily connect to any server, including a rogue server.

The right way is to make that specific server certificate trusted. This is usually done simply by finding the appropriate certificate file in the directory for rejected certificates, and moving or copying it over to the trusted certificates directory. Related information:

- kb.opclabs.com/Using_OpcCmd_Utility_for_OPC_UA_Administration
- opclabs.doc-that.com/files/onlinedocs/QuickOpc/Latest/User%2...%20Instance%20Certificate.html
- opclabs.doc-that.com/files/onlinedocs/QuickOpc/Latest/User%2...html#Certificate%20Stores.html
- opclabs.doc-that.com/files/onlinedocs/QuickOpc/Latest/User%2...ic%20Certificate%20Stores.html

Best regards

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

More
15 Sep 2021 09:38 #10222 by ulix86
Replied by ulix86 on topic vb6 connection parameters
Thank you.;)

I have another question to ask, please.

I would like to bypass the "certificate notification" when I start the connection to the OPC-UA server. (see attached below)

I tried to insert this line but unfortunatley doesn't work:
ReadArguments1.EndpointDescriptor.CertificateAcceptancePolicy.AcceptAnyCertificate = True

Dim ReadArguments1 As New UAReadArguments
ReadArguments1.EndpointDescriptor.UrlString = "Server"
ReadArguments1.EndpointDescriptor.UserIdentity.UserNameTokenInfo.UserName = "user"
ReadArguments1.EndpointDescriptor.UserIdentity.UserNameTokenInfo.Password = "password"
ReadArguments1.EndpointDescriptor.CertificateAcceptancePolicy.AcceptAnyCertificate = True
ReadArguments1.NodeDescriptor.NodeId.expandedText = "ns=2;s=Channel_1-ExecutionState"

Is the right way to do it?
Attachments:

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

More
13 Sep 2021 16:15 #10214 by support
Replied by support on topic vb6 connection parameters
OK I am glad that it works now.

Sometimes the problem is that a connection over an insecure endpoint is made, and that endpoint does not support user authentication. But it appears that your issue was different.

Best regards

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

More
13 Sep 2021 15:49 #10213 by ulix86
Replied by ulix86 on topic vb6 connection parameters
Sorry, it works...the problem was the Permission Rules on the machine!

thank you for support.

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

More
13 Sep 2021 14:48 #10212 by ulix86
Replied by ulix86 on topic vb6 connection parameters
sorry, the connection is

- ip: 192.168.0.77
- Username: MEP_SPA
- Password: ***********

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

More
13 Sep 2021 14:46 #10211 by ulix86
Replied by ulix86 on topic vb6 connection parameters
I try to explain the problem, in my company there is a sawing machine (ip: 172.16.108.33)
with an OPC-UA server installed.
I can already read and write nodes value with UAExpert but I need to implement an automation script with VB6
to read/write data from/to the machine.

The connection login is:

- Username: admin
- Password: admin

See attachments below.

is the endpoint connection the right way to do it?

thank you
Attachments:

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

More
13 Sep 2021 11:05 #10206 by support
Replied by support on topic vb6 connection parameters
Can you post here a picture of endpoints offered by this server in UAExpert, and mark the one you are using?

Thank you

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

More
13 Sep 2021 10:45 #10205 by ulix86
Replied by ulix86 on topic vb6 connection parameters
Thank you, it works! I missed the reference baselib!

but I have another question...

When I try to connect the server show me :

*** Failure: OPC-UA service result - Endpoint does not support the user identity type provided. = BadUserAccessDenied. [...]

Username and password are correct, with UAExpert Client it works fine.
I did something wrong with the code?
Dim ReadArguments1 As New UAReadArguments
    ReadArguments1.EndpointDescriptor.UrlString = "opc.tcp://172.16.108.33:4840"
    ReadArguments1.EndpointDescriptor.UserIdentity.UserNameTokenInfo.UserName = "username"
    ReadArguments1.EndpointDescriptor.UserIdentity.UserNameTokenInfo.Password = "password"
    ReadArguments1.NodeDescriptor.NodeId.expandedText = "ns=2;i=4164" 'total cut time

thank you.

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

More
More
13 Sep 2021 09:44 #10203 by ulix86
Replied by ulix86 on topic vb6 connection parameters
I'll try to be more clearly.

When I try to run the program, does it stop and show me the "undefined object error" in
Dim Result As ValueResult
line.

probably because ValueResult object is not part of the project.
Is it a class module? I have to declare it?

I did'nt find nothing about ValueResult in the vb6 examples.

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

Moderators: support
Time to create page: 0.065 seconds