Skip to main content



      Home
Home » Eclipse Projects » 4DIAC - Framework for Distributed Industrial Automation and Control » 4diac Client and Python Server(4diac Client and Python Server)
4diac Client and Python Server [message #1830489] Mon, 27 July 2020 15:01 Go to next message
Eclipse UserFriend
Hello everyone,

We're trying to have a communication between 4diac and a Python code using Client/Server.
We use 4diac Client to connect to a Python socket to exchange information. We can successfully connect 4diac client to Python server. Python server is receiving the data from 4diac client and we can see it. But when the server replies back, 4diac client can not show it in RD output. We can see the data coming thru wire-shark but looks like 4diac client is not able to parse it and show it.

Here is the Python code:

socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
socket.bind(("", 8080))
socket.listen(5)

while True:
client, address = socket.accept()
print(client.recv(1024))
client.send(bytes('data'))
client.close()
Re: 4diac Client and Python Server [message #1830493 is a reply to message #1830489] Mon, 27 July 2020 15:33 Go to previous message
Eclipse UserFriend
Hi Reza,

in the default configuration a client FB in 4diac FORTE expects to recieve and send data in the ASN.1 encoding defined in the "IEC 61499 compliance profile for feasbility demonstrations" [1]. Depending on the data connected to the RD_X ports you have to send the data in the according format. I hope this helps.

BR,
Alois

[1] https://www.holobloc.com/doc/ita/index.htm
Previous Topic:Date and Time Function Blocks
Next Topic:Problem creating External Event Handler
Goto Forum:
  


Current Time: Sun Jul 13 09:48:41 EDT 2025

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

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

Back to the top