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 » How to export custom FB to forte(Exporting new FBs to forte on Unix platform)
How to export custom FB to forte [message #1739894] Fri, 05 August 2016 13:32 Go to next message
Santosh Kumar Panda is currently offline Santosh Kumar PandaFriend
Messages: 9
Registered: June 2016
Junior Member
Hi All,

I want to read non boolean data from Raspberry Pi. So I would like to create a new FB. I have created a new function block in order to implement the task. I have exported the corresponding .cpp and .h files. Then I added both files to the src/stdfblib/io in forte. After that I compile the forte by using cmake and make.

Could anyone let me know whether is it the correct process or not?

Regards,
Santosh
Re: How to export custom FB to forte [message #1739910 is a reply to message #1739894] Fri, 05 August 2016 15:50 Go to previous message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1585
Registered: January 2014
Senior Member

Hi,

yes for a classical service interface FB like the one you are needing this is the correct development process. However there are a few things regarding code management I would like to bring up for your consideration:


  1. The core and the stdfblib directory contain code that is completely platform independent therefore I would suggest that you place your raspi specific FB not in this directory. The better place is a own module as described in the FB development tutorials. The advantage of modules is that they can be activated and that you can easier update FORTE code to newer versions.
  2. Since FORTE 1.8 we started to develop generic IO FBs. These are located in the stdfblib/io directory. In order that these are working correctly a platform needs to implement a class called CProcessInterface. As you know we provide several modules implementing this class for different platforms. For the boolean I/Os of the raspi this is done with the sysfs module. With the new Odriod module I pushed two weeks ago you can see how I expanded the generic Linux boolean sysfs IO support also with analogue inputs to be accessed with a IW (W for word) FB. This could also be an option for you.


I hope this helps.
Alois

[Updated on: Fri, 05 August 2016 15:52]

Report message to a moderator

Previous Topic:New distribuited Application Problem
Next Topic:Pin number for IX block while using Piface digital 2 switches
Goto Forum:
  


Current Time: Thu Apr 25 05:44:17 GMT 2024

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

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

Back to the top