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 » 4diac Client and Python Server(4diac Client and Python Server)
4diac Client and Python Server [message #1830489] Mon, 27 July 2020 19:01 Go to next message
Reza ELC is currently offline Reza ELCFriend
Messages: 5
Registered: June 2018
Junior Member
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 19:33 Go to previous message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1585
Registered: January 2014
Senior Member

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: Thu Apr 25 13:14:19 GMT 2024

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

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

Back to the top