Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » 4DIAC - Framework for Distributed Industrial Automation and Control » DATA_TYPE_ERROR in remote OPC UA server example
DATA_TYPE_ERROR in remote OPC UA server example [message #1841993] Sun, 06 June 2021 15:06 Go to next message
Tuojian Lyu is currently offline Tuojian LyuFriend
Messages: 18
Registered: October 2020
Junior Member
Hi,

I was following the tutorial "Read and write OPC UA variables on a remote server". The PUBLISH_1 and SUBSCRIBE_1 are working well with the opc ua server.

But, there is an error with the CLIENT_X_X and the error is DATA_TYPE_ERROR. The CLIENT_0_1 and CLIENT_1_0 are obtained by modifying the interfaces and names of CLIENT_1. I also checked the data type of SD_1 and it is ANY. The details of the application, devices, and resource configuration can be found via the attached images.

Specifics of the testing environment:
- two forte (with Open62541, version 1.0) instances running in the same cloud VM
- two port numbers, 61499 and 61500, are exposed from the cloud VM
- 4diac IDE version is 1.12.2

Thanks to anyone who can help me solve this issue.
Re: DATA_TYPE_ERROR in remote OPC UA server example [message #1842017 is a reply to message #1841993] Mon, 07 June 2021 10:39 Go to previous messageGo to next message
Jose Maria Jesus Cabral Lassalle is currently offline Jose Maria Jesus Cabral LassalleFriend
Messages: 16
Registered: January 2021
Junior Member
HI,

you should initialize first your clients, and then trigger the REQ. You're triggering the INIT and REQ in parallalel, so the client is not ready when you request. Remove the E_RESTART.COLD and E_RESTART.WARM going to INT2INT_2.REQ, and connect the CLIENT_0_1.INITO to INT2INT_2.REQ. That would be the first correction. BUt the initialization of the client is done asynschronously, meaning that you get and INITO event before it acutally initialized. So my recomendation would be to put a 3 seconds delay between CLIENT_0_1.INITO and INT2INT_2.REQ.

Another better example would be to have a E_CYCLE of 1 second being started by CLIENT_0_1.INITO and adding the output of it to a counter that you then send to CLIEN_1_0. This way, the first calls might fail, but later you will see the valid results
Re: DATA_TYPE_ERROR in remote OPC UA server example [message #1842043 is a reply to message #1842017] Tue, 08 June 2021 07:19 Go to previous messageGo to next message
Tuojian Lyu is currently offline Tuojian LyuFriend
Messages: 18
Registered: October 2020
Junior Member
Thanks, Jose. Your solution and recommendation solved my problem. It is true that the CLIENT should have some time for its initialization. Once the CLIENT initialized, it can connect to the remote OPC UA server without any error.

Another problem that I viewed is that the data type of variables should be matched otherwise there will be DATA_TYPE_ERROR in CLIENT_1_0.STATUS and BadTypeMismatch from the Forte log. An INT2INT converter is needed in my case.

This is the working version of reading from and writing to a remote OPC UA server, just in case someone may have the same doubts as me.

index.php/fa/40592/0/
  • Attachment: MyExample.PNG
    (Size: 77.82KB, Downloaded 232 times)
Re: DATA_TYPE_ERROR in remote OPC UA server example [message #1842555 is a reply to message #1842043] Wed, 23 June 2021 13:27 Go to previous messageGo to next message
K Y is currently offline K YFriend
Messages: 7
Registered: May 2021
Junior Member
HI Lyu,Your work was has inspired me a lot, I have some question on how to build OPCua on forte,there are some questions confused me a lot.Hope you can give me some advice.If it is convenient, can you communicate through e-mail ?
Re: DATA_TYPE_ERROR in remote OPC UA server example [message #1842588 is a reply to message #1842555] Thu, 24 June 2021 13:15 Go to previous message
Tuojian Lyu is currently offline Tuojian LyuFriend
Messages: 18
Registered: October 2020
Junior Member
Hi, of course, I am glad to do that. You can contact me via tuojian.lyu(at)aalto.fi
Previous Topic:Sample projects
Next Topic:Error embedding in python
Goto Forum:
  


Current Time: Thu Apr 25 21:56:38 GMT 2024

Powered by FUDForum. Page generated in 0.02835 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top