OPC-UA string to OUT port string error
Hi,
I’m currently working on a project to connect a OPC-UA value to a global OUT port that’s connected to a C++ application.
When writing a value to OPC-UA, the following debug screen is visible.
[img]https://i.imgur.com/sKTHP9l.png[/img]
When I’m changing the WebApp.city and WebApp.key to a hardcoded string (e.g. Jakarta) the code works fine.
Does anybody know what is wrong?
Kind regards,
Kelvin S.
I’m currently working on a project to connect a OPC-UA value to a global OUT port that’s connected to a C++ application.
When writing a value to OPC-UA, the following debug screen is visible.
[img]https://i.imgur.com/sKTHP9l.png[/img]
When I’m changing the WebApp.city and WebApp.key to a hardcoded string (e.g. Jakarta) the code works fine.
Does anybody know what is wrong?
Kind regards,
Kelvin S.
Comments
- the type of the WebApp structure, including the types of all the fields?
- the declaration of the WebApp variable?
- the declaration of the glob_wapi_city and glob_wapi_key variables?
The WebApp structure has the following UDT:
It is decelerated in the main instance:
The OUT ports are also defined in the main instance:
The C++ application is called every 10s with a watchdogtimer of 15s. It is connected like this:
Kind regards,
Kelvin S
Is the connection to the C++ program instance relevant in this case? i.e., if you disconnect the two OUT ports from the C++ program variables, does the assignment in the Main program instance work properly?
When I'm using a temporary string it also doesn't work.
I will look further and submit the answer to the forum when I fixed the problem.
Kind regards,
Kelvin S.
I am using PLCnext Engineer 2021.3 and AXC F 2152 FW 2021.0.5.
Please check that the Cycle100 task is actually being executed cyclically, and that the assignment is being called on every task cycle.
If found the bug! When the FAIL led is turned on, the conversion from string to string doesn’t work anymore. A soft reset was all what was needed.
Kind regards,
Kelvin
If the FAIL LED continues to appear, and if you need help with that, please let us know in a separate post.
For everyone who is facing the same problem. Check the watchdogtimer. I changed it to 0 (turns watchdog off) and everything was fine!
Kind regards,
Kelvin
~ Martin.