Hopefully I can get some help configuring an OPC UA subscriber in a CODESYS runtime in a Raspberry Pi 5 that tries to retrieve data from an OPC UA publisher (in this case running in a TwinCAT system).
Seems that the example provided was created with version 3.5.16.0. Now with version 3.5.20.20 is not possible to open the complete project neither convert it.
Anyway, after configuring all IPs and ports used in the OPC UA connection function block but the connection state always shows DISABLED.
Can someone help me to do the proper configuration of the OPC UA subscriber?
As far as projects in "old version"s are concerned, these can be upgraded to newer versions at any time. To do this, the device must be updated accordingly and the copilers and library versions must be adapted.
Regaring your OPCUA connection state always showing just "DISABLED", without knowing both sides of the assembly in detail, one can only approach the problem theoretically.
We can give a chekclist on how to proceed:
Fist, please recheck the communication settings in the OPC UA connection function block to ensure that the server URL, endpoint URL, and other settings are correct and match the configuration of the OPC UA server.
Verify that the OPC UA server is running and accessible.
-You can try to connect to the OPC UA server using a separate client, such as UAExpert, to ensure that the issue is not related to the OPC UA server itself.
Test the security settings in the OPC UA connection function block to ensure that the correct security policy and certificate are selected.
If you are using a dynamic connection to the OPC UA server, probe that the connection settings are correctly configured and that the OPC UA client is able to establish a connection to the OPC UA server.
Also, please loock into the log files for any errors related to the OPC UA connection function block, these should be listet there.
The log files may also provide additional information about the issue and help you to further troubleshoot the problem.
Her you can finde the Communication settings via OPC UA Server -> layout Browse Live Server:
The client connects to the server and detects the existing variables and types.
From Information Model The client reads the data structure (layout) of the OPC UA Server from the information model set here and as a result receives the information about available variables and types.
A connection to the server is not required.
The list contains the information models installed in the OPC UA Information Model Repository.
"Read Connection" Settings from IEC Variable (option set):
- The connection settings used by the device are not read here from the dialog, but at runtime from the IEC variable specified here.
- For this possibility, please see the Using a Dynamic Connection to an OPC UA Server (https://content.helpme-codesys.com/en/CODESYS%20Communication/_comm_use_dynamic_opc_ua_server_comm_settings.html)
The settings for the communication of a Client-data source to an OPC UA Server can also be dynamically configured from the IEC code and can also be changed at runtime.
Hello All,
Hopefully I can get some help configuring an OPC UA subscriber in a CODESYS runtime in a Raspberry Pi 5 that tries to retrieve data from an OPC UA publisher (in this case running in a TwinCAT system).
I tried to follow the steps described in the page to implement the OPC UA subscriber: https://content.helpme-codesys.com/en/CODESYS%20Examples/_ex_opcua_pubsub.html
Seems that the example provided was created with version 3.5.16.0. Now with version 3.5.20.20 is not possible to open the complete project neither convert it.
Anyway, after configuring all IPs and ports used in the OPC UA connection function block but the connection state always shows DISABLED.
Can someone help me to do the proper configuration of the OPC UA subscriber?
Many thanks in advance.
Hi.
As far as projects in "old version"s are concerned, these can be upgraded to newer versions at any time. To do this, the device must be updated accordingly and the copilers and library versions must be adapted.
You can find instructions on how to proceed in the online help/FAQ:
https://content.helpme-codesys.com/en/CODESYS%20Development%20System/_cds_changing_compiler_version.html
https://content.helpme-codesys.com/en/CODESYS%20Development%20System/_cds_cmd_update_device.html
See also 4.3.22.4 "How to open an Example Project" within the following pdf for more details on the single steps:
https://forge.codesys.com/lib/counit/tickets/_discuss/thread/3e991befbc/ca97/attachment/Public%20FAQ-v13-20240610_075228.pdf
Regaring your OPCUA connection state always showing just "DISABLED", without knowing both sides of the assembly in detail, one can only approach the problem theoretically.
We can give a chekclist on how to proceed:
Fist, please recheck the communication settings in the OPC UA connection function block to ensure that the server URL, endpoint URL, and other settings are correct and match the configuration of the OPC UA server.
Verify that the OPC UA server is running and accessible.
-You can try to connect to the OPC UA server using a separate client, such as UAExpert, to ensure that the issue is not related to the OPC UA server itself.
Test the security settings in the OPC UA connection function block to ensure that the correct security policy and certificate are selected.
If you are using a dynamic connection to the OPC UA server, probe that the connection settings are correctly configured and that the OPC UA client is able to establish a connection to the OPC UA server.
Also, please loock into the log files for any errors related to the OPC UA connection function block, these should be listet there.
The log files may also provide additional information about the issue and help you to further troubleshoot the problem.
FYI - Please see https://content.helpme-codesys.com/en/CODESYS%20Communication/_cds_obj_data_source_communication_opc_ua_server.html:
Her you can finde the Communication settings via OPC UA Server -> layout Browse Live Server:
The client connects to the server and detects the existing variables and types.
From Information Model The client reads the data structure (layout) of the OPC UA Server from the information model set here and as a result receives the information about available variables and types.
A connection to the server is not required.
The list contains the information models installed in the OPC UA Information Model Repository.
"Read Connection" Settings from IEC Variable (option set):
- The connection settings used by the device are not read here from the dialog, but at runtime from the IEC variable specified here.
- For this possibility, please see the Using a Dynamic Connection to an OPC UA Server (https://content.helpme-codesys.com/en/CODESYS%20Communication/_comm_use_dynamic_opc_ua_server_comm_settings.html)
The settings for the communication of a Client-data source to an OPC UA Server can also be dynamically configured from the IEC code and can also be changed at runtime.
For such a purpose, a structure is available in the DatasourceOpcUAServer library
(For a description of the OPC UA Server, there is one included in the standard installation of CODESYS,
https://content.helpme-codesys.com/en/CODESYS%20Communication/_cds_encrypt_communication_data_sources_opc_ua_client.html)