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 » BFB algorithms in Java/C++(How to write algorithms in Java or C++ in 4diac)
BFB algorithms in Java/C++ [message #1760146] Sun, 23 April 2017 18:39 Go to next message
Marc Jakobi is currently offline Marc JakobiFriend
Messages: 65
Registered: April 2017
Member
Hello.

I am getting to know 4diac and experimenting with the function block editor. According to the documentation (subsection "Editing of Basic Function Block Types - Algorithms" in the section "Management of IEC 61499 Element Types"), it says, "Depending on the selected algorithm type different algorithm editors are provided."

However, in my installation the only language options are ST and "Any Text". Does this mean I have to use the "Any Text" option for Java and C++ or am I overlooking something?
Re: BFB algorithms in Java/C++ [message #1760191 is a reply to message #1760146] Mon, 24 April 2017 12:58 Go to previous messageGo to next message
Monika Wenger is currently offline Monika WengerFriend
Messages: 18
Registered: September 2015
Junior Member
Currently ST and Any Text is provided, so your Installation is correct. Please consider that FORTE (4diac runtime environment) does not support Java since it is written in C++. This means 4diac currently only provides C++ Export. Therefor Any Text should be C++, until you write your own exporter or want to use your BFB within FBDK. Please also consider that this C++ is FORTE specific, e.g. variables are used like function calls VAR1 should be VAR1().

Using C++ makes your BFB tool dependent. We recommend to write ST.

[Updated on: Mon, 24 April 2017 13:02]

Report message to a moderator

Re: BFB algorithms in Java/C++ [message #1760268 is a reply to message #1760191] Tue, 25 April 2017 10:02 Go to previous messageGo to next message
Marc Jakobi is currently offline Marc JakobiFriend
Messages: 65
Registered: April 2017
Member
Thank you for your reply!
So I presume the easiest way to write algorithms in c++ is to export the fb interface and then write the algorithms in Visual Studio?
Re: BFB algorithms in Java/C++ [message #1760280 is a reply to message #1760268] Tue, 25 April 2017 13:30 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 644
Registered: January 2014
Senior Member
I would say yes this is the quickest way to write algorithms in c++. However please note that then the algorithms are not part of your fbt file. So maybe you would like to copy them back afterwards so that you have single source of truth.

Fruthermore I would like to emphasize Monika's comment regarding ST algorithms. On the long run considering the handling and portabilty of your FBs algorithms in ST will be the better option. Especially when considering the upcoming dynamic deployment feature where you don't need to compile your FORTE everytime you change an FB but just press download. This will only work for ST algorithms.
Re: BFB algorithms in Java/C++ [message #1760312 is a reply to message #1760280] Tue, 25 April 2017 17:14 Go to previous messageGo to next message
Marc Jakobi is currently offline Marc JakobiFriend
Messages: 65
Registered: April 2017
Member
Thanks for the advice!
I will definitely be sticking to ST for the main application components. I am still in the process of getting to know 4diac, however, and am therefore experimenting with and comparing it's capabilities. C++ may turn out to be necessary for EEBus communication SIFBs, for example.
Re: BFB algorithms in Java/C++ [message #1760409 is a reply to message #1760312] Wed, 26 April 2017 19:00 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 644
Registered: January 2014
Senior Member
Ah for SIFBs you need to stick to C++. There is currently no way around it. But maybe you want to consider our communication framework (an overview you can find in the FORTE development documentation section), where you don't write new FBs but communciation layers to be used by PUBLISH, SUBSCRIBE, CLIENT, and SERVER.
Re: BFB algorithms in Java/C++ [message #1760452 is a reply to message #1760409] Thu, 27 April 2017 12:57 Go to previous messageGo to next message
Marc Jakobi is currently offline Marc JakobiFriend
Messages: 65
Registered: April 2017
Member
Thanks for the hint! I will check it out, that does sound like a better idea.
Re: BFB algorithms in Java/C++ [message #1760484 is a reply to message #1760452] Thu, 27 April 2017 16:23 Go to previous message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 644
Registered: January 2014
Senior Member
You are welcome. But be warned that you may need to learn a bit more about the internals of FORTE. If you are looking for examples the MQTT, Eclipse NeoSCADA SFP, and OPC UA layers are quite good.
Previous Topic:Problems deploying applications
Next Topic:mqtt on raspberry pi
Goto Forum:
  


Current Time: Wed Oct 17 07:49:08 GMT 2018

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

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

Back to the top