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 » Issue with client/server and vmware
Issue with client/server and vmware [message #1806203] Mon, 06 May 2019 08:21 Go to next message
Banane Elephant is currently offline Banane ElephantFriend
Messages: 11
Registered: April 2019
Junior Member
Hi,

I'm trying to establish a connection between 4diac and a software that runs on vmware. I use my PLC has a servers, i managed to send data to wmware but with 4 bytes more (i don't know why). And for the reception of the data from vmware, I constantly get DATA_TYPE_ERROR, even if I put FB with the right data input, in my case 104 bytes or 26 DWORD, I've even checked with wireshark :^(

Hope i was clear, Thanks,
  • Attachment: App.PNG
    (Size: 129.90KB, Downloaded 77 times)
  • Attachment: sending.PNG
    (Size: 30.40KB, Downloaded 87 times)
  • Attachment: receiving.PNG
    (Size: 13.56KB, Downloaded 74 times)
  • Attachment: errors.PNG
    (Size: 21.84KB, Downloaded 75 times)
  • Attachment: run_mode.PNG
    (Size: 12.86KB, Downloaded 87 times)
Re: Issue with client/server and vmware [message #1806209 is a reply to message #1806203] Mon, 06 May 2019 08:59 Go to previous messageGo to next message
Jose Maria Jesus Cabral Lassalle is currently offline Jose Maria Jesus Cabral LassalleFriend
Messages: 199
Registered: February 2016
Senior Member
Maybe because the arrays are not the same lengh. But I'm not sure
Re: Issue with client/server and vmware [message #1806213 is a reply to message #1806209] Mon, 06 May 2019 09:29 Go to previous messageGo to next message
Martin Melik Merkumians is currently offline Martin Melik MerkumiansFriend
Messages: 117
Registered: March 2016
Senior Member
Hi,

Jose is correct. Arrays with different sizes are different data types.

Best
Martin
Re: Issue with client/server and vmware [message #1806223 is a reply to message #1806213] Mon, 06 May 2019 11:50 Go to previous messageGo to next message
Banane Elephant is currently offline Banane ElephantFriend
Messages: 11
Registered: April 2019
Junior Member
I don't get it, I'm supposed to send an array of 32 DWORDs and to receive 26 DWORDs. What am I supposed to do ?
Re: Issue with client/server and vmware [message #1806237 is a reply to message #1806223] Mon, 06 May 2019 16:45 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1560
Registered: January 2014
Senior Member

The "IEC 61499 compliance profile for feasibilty demonstrations" [1] defines that on sender and receiver side the arrays have to be of equal size. So you get the data type error as the decoding code gets over the network an array with 32 elements but only space for 26. What shoudl we do with the remaining 6? Therefore you have to connect your sever FB to a FB which has an input with an array of length 32. Maybe just expanding the receiver FB to 32 and ignore the last 6. If this is correct. This depends on your application.

Re: Issue with client/server and vmware [message #1806263 is a reply to message #1806237] Tue, 07 May 2019 08:06 Go to previous messageGo to next message
Banane Elephant is currently offline Banane ElephantFriend
Messages: 11
Registered: April 2019
Junior Member
Thanks for your answer, I changed the input of my receiving FB as you said. But I still get errors. I tried other configurations but in any case I have the same result maybe the issue is not from 4diac ?
  • Attachment: errors2.PNG
    (Size: 26.38KB, Downloaded 69 times)
Re: Issue with client/server and vmware [message #1806264 is a reply to message #1806263] Tue, 07 May 2019 08:18 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1560
Registered: January 2014
Senior Member

You have not connected anything on the SD_1 input of your server FB. When this input is not connected or not given a litaral with type spec (e.g., INT#12) the FB does not know what to do with it. Therefore the the data type error now could also come from this. For quick test you could remove the event connection from your RSP input. Do you want to send data back?
Re: Issue with client/server and vmware [message #1806271 is a reply to message #1806264] Tue, 07 May 2019 09:20 Go to previous messageGo to next message
Banane Elephant is currently offline Banane ElephantFriend
Messages: 11
Registered: April 2019
Junior Member
I tried to connect the input of my sending (32DWORDs) on my receiving server but it's not effective either. I also tried to remove the connection from RSP intput but nothing came out.
For my application I want to have one server that receive data and one that send.

Thanks for your quick answers
  • Attachment: errors3.PNG
    (Size: 76.03KB, Downloaded 67 times)
Re: Issue with client/server and vmware [message #1806273 is a reply to message #1806271] Tue, 07 May 2019 09:48 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1560
Registered: January 2014
Senior Member

I did a recap of your application and I noticed two things:
1. Where is your client FB? 1499 client server communication works such that you send data over a client with its request event this leads to an ind event on the corresponding server. The application can respond to the client with the RSP leading to a CNF on the CLIENT.
2. you are triggering the RSP event of the SERVER not as a result of the IND. You should not do it. The server will send you an IND event when it receives something

Re: Issue with client/server and vmware [message #1806283 is a reply to message #1806273] Tue, 07 May 2019 11:28 Go to previous messageGo to next message
Banane Elephant is currently offline Banane ElephantFriend
Messages: 11
Registered: April 2019
Junior Member
My app communicate with a software that runs on vmware. The soft acts as two clients so on my app I have two server to communicate with him.
Re: Issue with client/server and vmware [message #1806289 is a reply to message #1806283] Tue, 07 May 2019 12:18 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1560
Registered: January 2014
Senior Member

Ah ok. What kind of software is that? What messages does it send? What is the message format? They way you configured your Server FBs 4diac FORTE is assuming that the messages are coming in the Asn.1 encoding defined in the "IEC 61499 compliance profile for feasibility demonstrations" [1]. If that is not the case then you need to write you an own decoding layer that is taking the message coming from the network and translate it to IEC 61131-3 datatypes.
Re: Issue with client/server and vmware [message #1806292 is a reply to message #1806289] Tue, 07 May 2019 12:38 Go to previous messageGo to next message
Banane Elephant is currently offline Banane ElephantFriend
Messages: 11
Registered: April 2019
Junior Member
The soft is private but it uses TCP/IP and it sends a 104bytes of data, how can I write my own FB server ?
Thanks for taking your time to help me.
Re: Issue with client/server and vmware [message #1806303 is a reply to message #1806292] Tue, 07 May 2019 13:38 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1560
Registered: January 2014
Senior Member

The good news is you don't need to write a full server. You only need to write a communication layer. As starting point you can have a look at the raw layer. This layer takes in the recv method the data received and interprets it as string. For your communication layer you would need to implement the according decoding functionality in the recv method. Please also have a look on the documentation of 4diac FORTE's communication architecture: https://www.eclipse.org/4diac/en_help.php?helppage=html/development/forte_communicationArchitecture.html
Re: Issue with client/server and vmware [message #1806305 is a reply to message #1806303] Tue, 07 May 2019 13:59 Go to previous messageGo to next message
Banane Elephant is currently offline Banane ElephantFriend
Messages: 11
Registered: April 2019
Junior Member
Ok, i'll check that.
thanks a lot Alois :^)
Re: Issue with client/server and vmware [message #1806736 is a reply to message #1806303] Tue, 14 May 2019 13:36 Go to previous messageGo to next message
Banane Elephant is currently offline Banane ElephantFriend
Messages: 11
Registered: April 2019
Junior Member
Hi, it's me again.
I've came to the conclusion that I don't need the medium comLayer, I just want to communicate in TCP/IP without ASN.1 .
I tried to configure FORTE with Cmake for that, but now I can't deploy my app to the PLC.
Is it possible to do this ? Because it would be perfect if i could just have TCP/IP connection.
Re: Issue with client/server and vmware [message #1806764 is a reply to message #1806736] Tue, 14 May 2019 22:04 Go to previous message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1560
Registered: January 2014
Senior Member

You will need the com FBDk layer otherwise 4diac IDE cannot connect to your 4diac FORTE.

Also you will need some layer on top of our TCP/IP layer as the TCP/IP layer is designed such that it takes the data received from the network and hands it on to some upper layer. So you need some mechanism which takes transforms the bytes received into a IEC 61131-3 data type. Otherwise you will not be able to process it with an IEC 61131⁻3 function block.
Previous Topic:Lego EV3 set tacho-motor speed
Next Topic:Any downloads and documents for porting to Freertos?
Goto Forum:
  


Current Time: Fri Mar 29 14:06:19 GMT 2024

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

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

Back to the top