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 » Error embedding in python(Problem with parallel emb_res (embedded python))
Error embedding in python [message #1842412] Fri, 18 June 2021 03:13 Go to next message
Reinaldo Moreira is currently offline Reinaldo MoreiraFriend
Messages: 1
Registered: June 2021
Junior Member
I am currently developing an application to run multiagent with IEC 61499. For this purpose I am working with SPADE, a python library for multiagentes (embedded in C). The agents are distributed in 3 Raspberry, one of which has 3 agents. Each agent is inside a block that runs a python script embedded in C, and each agent runs in a loop, so I added more than one emb_res in the system configuration. The problem arises when I want to deploy the second emb_res and the message "segmentation fault" appears.
To keep things simple and find the source of the problem I just run a "print" command in a loop for each python script.
To better understand the situation I attach images with the error, the python script, the cpp sourcefile, and the CMakelists.txt file
Re: Error embedding in python [message #1842416 is a reply to message #1842412] Fri, 18 June 2021 07:03 Go to previous messageGo to next message
Martin Melik Merkumians is currently offline Martin Melik MerkumiansFriend
Messages: 117
Registered: March 2016
Senior Member
Hi,

I would recommend you to run this with a debugger. Otherwise we would have to guess what's happening.

Best regards,
Martin
Re: Error embedding in python [message #1842597 is a reply to message #1842416] Thu, 24 June 2021 20:27 Go to previous message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1585
Registered: January 2014
Senior Member

While I totaly agree with Martin that a debugger stack trace would be needed to have some hints what could be wrong here, I wanted to give some general comment: IEC 61499 defines FBs to behave algorithmic, which means they should end their execution triggered by an event. IEC 61499 even says that the execution should be rather short. This assumption is needed for 4diac FORTE to get a decent IEC 61499 execution behavior. With your approach your are definitely violating that. But given your comment I would assume that you are doing that on purpose. However I wanted to point out that putting the Phyton part into a background thread and have some interaction between 4diac FORTE FBs and the Phyton part.
Previous Topic:DATA_TYPE_ERROR in remote OPC UA server example
Next Topic:Dynamic reconfiguration
Goto Forum:
  


Current Time: Thu Apr 25 22:42:02 GMT 2024

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

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

Back to the top