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 » Adding a custom function block inside forte RTE (C Code)
Adding a custom function block inside forte RTE (C Code) [message #1785213] Wed, 11 April 2018 05:21 Go to next message
Mohammad Ebrahimi is currently offline Mohammad EbrahimiFriend
Messages: 1
Registered: April 2018
Junior Member
Hi, hope you are doing great,

I am trying to add a custom function block aimed to access to my system I/O cards through CAN bus. I am using Raspberry Pi as the system platform.

Our system I/O cards driver is in C/C++, therefore I decided to add this source code (I/O driver API) as new function block to forte RTE.

But I didn't manage to find the method of how to do this. And I have no idea where to start and put my source code inside forte.

It would be greatly appreciated if anyone can give me a hint of how to do that.
Re: Adding a custom function block inside forte RTE (C Code) [message #1785322 is a reply to message #1785213] Thu, 12 April 2018 12:51 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1585
Registered: January 2014
Senior Member

There are several options on how to do this. The main part is always that you would create your own module. There you can place your code and rig it up with our cmake calls to announce it at the build system. As a starting point you could have a look at the tutorials for creating your own function blocks and how to compile them into forte.

Regarding IOs there are three options:

1. Create you own service interface FBs (not preferred): Here you would model SIFBs in 4diac-ide generate the c++ code for them and add in the FBs the code for accessing your IO code.

2. Since a few version versions we introduced a set of generic IO FBs (IX, IXB, IW ID, and QX, QB, QW QD). there the main logic is already in the FBs and you only have to write a class called process interface. There are several modules in FORTE serving as example for that.

3. Finally with 1.9.0 we are introducing an additional concept which allows you to also do IO system configuration in 4daic. Here the generic IO FBs are used but they use a symbolic name and in a configuration resource these symbolic names are then mapped to the real IOs. Currently we have only one public example implementation in the forte repo and that is the embrick implementation.

While the last one is definitely the best and most flexible one. In your case you could use it even to configure and setup your can network with can IO modules. It is also the most complicated and as it is new also the one with no real documentation and only one example.

I hope this at least gives you some start.
Re: Adding a custom function block inside forte RTE (C Code) [message #1833911 is a reply to message #1785322] Tue, 27 October 2020 15:57 Go to previous message
Pradeep Patel is currently offline Pradeep PatelFriend
Messages: 16
Registered: October 2020
Junior Member
As per point3 in above post, embrick implementation is the most latest way of implementing custom FBs. I can see this post is of 2018 and there was no documentation available for embrick implementation at that time. Do you have it's documentation now? if yes, where can i find the same?

[Updated on: Wed, 28 October 2020 14:42]

Report message to a moderator

Previous Topic:FORTE execution on Raspberry Pi 3
Next Topic:Older cmake does not support continue()
Goto Forum:
  


Current Time: Thu Apr 25 18:49:38 GMT 2024

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

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

Back to the top