<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Datasource OPC UA Client error ID:7012</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/4ba883be73/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/4ba883be73/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/4ba883be73/</id><updated>2024-04-05T05:05:24.125000Z</updated><subtitle>Recent posts to Datasource OPC UA Client error ID:7012</subtitle><entry><title>Datasource OPC UA Client error ID:7012</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/4ba883be73/?limit=25#ff53/9c6a" rel="alternate"/><published>2024-04-05T05:05:24.125000Z</published><updated>2024-04-05T05:05:24.125000Z</updated><author><name>vincentd</name><uri>https://forge.codesys.com/u/vincentd/</uri></author><id>https://forge.codesys.comf0eebf251d2ed6a96661513483c84ce8490e9eea</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I have not used this client / server OPC UA combination since. We were only making some kind of proof of concept. I did understand that there could be some kind of bug. I do not know if the supposed bug has been resoved since. Perhaps you could try what piautomation is suggesting&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Datasource OPC UA Client error ID:7012</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/4ba883be73/?limit=25#4735/8400/8d7f" rel="alternate"/><published>2024-04-05T04:59:26.691000Z</published><updated>2024-04-05T04:59:26.691000Z</updated><author><name>vincentd</name><uri>https://forge.codesys.com/u/vincentd/</uri></author><id>https://forge.codesys.com6eead51fa3a6626dfb9079088aac2b513998b5df</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;the target is the codesys software executing the PLC code like ladder / instruction list etc... &lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Datasource OPC UA Client error ID:7012</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/4ba883be73/?limit=25#ff53" rel="alternate"/><published>2024-04-04T12:24:02.277000Z</published><updated>2024-04-04T12:24:02.277000Z</updated><author><name>simonh</name><uri>https://forge.codesys.com/u/simonh/</uri></author><id>https://forge.codesys.com1455f82c0f9d78f93d87972476f67274ed21321a</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello, did you find the solution for the communication?Has the communication between the two been successful? if yes, can you please share me your solution since i have similar issue now. Thanks. &lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Datasource OPC UA Client error ID:7012</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/4ba883be73/?limit=25#4735/8400" rel="alternate"/><published>2023-11-21T07:06:48.238000Z</published><updated>2023-11-21T07:06:48.238000Z</updated><author><name>vformanek</name><uri>https://forge.codesys.com/u/vformanek/</uri></author><id>https://forge.codesys.com43a876c480d296117f6a819bbb8bf832ce024ad9</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Sorry to bother but what do you mean by target ? &lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Datasource OPC UA Client error ID:7012</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/4ba883be73/?limit=25#4735" rel="alternate"/><published>2023-11-21T07:03:35.013000Z</published><updated>2023-11-21T07:03:35.013000Z</updated><author><name>vincentd</name><uri>https://forge.codesys.com/u/vincentd/</uri></author><id>https://forge.codesys.comb18ee4b8d15716215421b2c0c7363a5387074ef9</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I had some help from Codesys to debug this problem. It seems there was a problem within the target (a bug?). I only used for a proof of concept. Possibly it will work with a new version of the target&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Datasource OPC UA Client error ID:7012</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/4ba883be73/?limit=25#4db9/a85d" rel="alternate"/><published>2023-11-21T06:56:05.551000Z</published><updated>2023-11-21T06:56:05.551000Z</updated><author><name>vformanek</name><uri>https://forge.codesys.com/u/vformanek/</uri></author><id>https://forge.codesys.comf0bd6291c44997036e27401207efc2e90296f354</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hey, I am facing the same problem. Basically UA Expert and other programs work fine with the login credentials. But codesys can not use them properly. I can see the server login to it manually but when I download the program and run the datasource never runs... &lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Datasource OPC UA Client error ID:7012</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/4ba883be73/?limit=25#4db9" rel="alternate"/><published>2023-04-13T06:34:14.161000Z</published><updated>2023-04-13T06:34:14.161000Z</updated><author><name>piautomation</name><uri>https://forge.codesys.com/u/piautomation/</uri></author><id>https://forge.codesys.comb2d1f25d119c807b9462c53252bbdae2469eb1af</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello vincentd,&lt;/p&gt;
&lt;p&gt;have you already tried to use the hostname? CODESYS does not have the IP Address in their certificates. If the PLC cannot resolve a host name, no connection can be established via certificate. So you need to add the IP to the hosts file (after adding, delete the ARP cache if necessary, if IP is assigned via DHCP, the hosts file may have to be adjusted more often... ) or use the hostname if possible. IP address is just working for non-encrypted communication.&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Datasource OPC UA Client error ID:7012</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/4ba883be73/?limit=25#e31c" rel="alternate"/><published>2023-02-03T18:23:34.996000Z</published><updated>2023-02-03T18:23:34.996000Z</updated><author><name>vincentd</name><uri>https://forge.codesys.com/u/vincentd/</uri></author><id>https://forge.codesys.com805c7989cb06963c917f8e104620b363eb68ec0a</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I'am testing the OPC UA client (datsasource) using the control win V3 in demo mode (version 3.5.18 patch 40).T&lt;br/&gt;
The opc UA server is a B&amp;amp;R Buscontroler type X20BC008T which is to be connected to an Codesys PLC with a target 3.5.18.40.&lt;br/&gt;
Both 'sign and encript' and loggin are recquired&lt;br/&gt;
When configuring the datasource the OPC UA server is found and the available variables are shown and imported.&lt;br/&gt;
I've created the datasource initialser with the same username and password used to import the variable.&lt;br/&gt;
How ever at runtime the datasource manager trhows an error 7012 'The username that is passed to the userconfiguration at runtime must be the same as the username passed in the Datasource configuration. Error 7012'&lt;br/&gt;
In the logbook there are two lines indicating the error :&lt;br/&gt;
'Diffring username at configuration and runtime.  vs BR'&lt;br/&gt;
and&lt;br/&gt;
Datasource_X20BC008T : Error failed (7012) in state connecting'&lt;br/&gt;
What does Diffring mean?&lt;br/&gt;
Is there someting I'm missing&lt;/p&gt;
&lt;p&gt;Below the code for the datasource manager, I've added 'BR' after _password. Is this the wrong way to use it?&lt;/p&gt;
&lt;p&gt;is there somewhere an example using 'sign and encript' in stead of anonymous loggin?&lt;br/&gt;
I've attached 5 screenhots.&lt;/p&gt;
&lt;p&gt;{attribute 'call_after_global_init_slot' := '60000'} // Call after the datasources are initialized.&lt;br/&gt;
{attribute 'linkalways'} // This program is always part of the application, even if not directly called.&lt;br/&gt;
PROGRAM Datasource_X20BC008T_Initializer&lt;br/&gt;
VAR&lt;br/&gt;
    // The static credentials provider stores the password as part of the application.&lt;br/&gt;
    // To provide the password with a visu-dialog use a 'Visu_FbDialogLoginProvider'.&lt;br/&gt;
    // To provide a custom implementation, implement the interface 'Datasources.ICredentialsProvider' and return an 'IDatasources.ICredentialsUserPassword'.&lt;br/&gt;
    staticCredentialsProvider : Datasources.StaticCredentialsProvider := (&lt;br/&gt;
        _username := 'BR',&lt;br/&gt;
        _password := 'BR');&lt;br/&gt;
END_VAR&lt;br/&gt;
g_Datasources.GetDatasource('Datasource_X20BC008T').SetCredentialsProvider(staticCredentialsProvider);&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>