I try to connect my CP0482 to a OPC-UA Server in my network by using the opcua_any module. I can see the server in the UaExpert tool as well as the tags, but I cannot connect with the B&R controller. All IO values (Module OK = False) are 0 but the IP:Port is correct.
I know that there are no channels defined (I also tried with defined channels) but at least any server error has to show up, or am I wrong=
@wolfgang.tengg maybe a silly question but did you enable the OpcUa system under the configuration?
What error messages do you see in the logger? You need to enable the Connectivity log in order to see OpcUa entries.
I see either OPC UA system not activated or OPC UA connection failed with an OpcUa enabled.
EDIT:
The logger information will be helpful. Testing an actual connection I ran into this error
And after adjusting the OpcUa_any configuration it connected successfully and you should see ModuleOK = TRUE and data in the rest of the diagnostic parameters.
Dear Marcel, thank you for your quick reply. OPC-UA System is of course activated, but where can I find the Connectivity log? Is it hidden in the normal logger? (there I cannot find any entry regarding the OPC-UA SYstem)
Try testing it without the channel configuration first.
The error you are seeing is related to that variable.
OPC UA Foundation error codes - Bad_TypeMismatch 0x80740000 - The value provided for the attribute is not of the same type as the attribute’s value.
Of what data type is your MyVariable?
EDIT:
There seems to be something else because mine connects and only enters warnings if the data type doesn’t match or the variable I configure doesn’t exist/can’t be found.
please check the BrowsePath attribute and also consider the escaping of the “default namespace”.
See here
Examples for process variables from the B&R Informationsmodel where x has to be replaced by the namespace index and depends on the model version (PV Model 1 or 2) configured on the server:
Global variable: /x:&:&:/x:Global PV/x:MyVariable
Local variable: /x:&:&:/x:MyTask/x:MyVariable