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 » Publish/Subscribe and Client/Server FBs with more SDs and RDs inputs and outputs
Publish/Subscribe and Client/Server FBs with more SDs and RDs inputs and outputs [message #1790171] Wed, 06 June 2018 12:31 Go to next message
Udayanto Dwi Atmojo is currently offline Udayanto Dwi AtmojoFriend
Messages: 4
Registered: March 2018
Junior Member
Hello Alois (or anyone else in the Fordiac development team),

I was wondering on how straightforward it is to compile new Publish/Subscribe or Client/Server FBs which have additional SD or RD inputs and outputs for FORTE. I attempted to create Client and Server FBs with more RDs and SDs in the IDE and export them into C++ code for FORTE's compilation, but I'm not sure whether I as the FB programmers/designers will need to add/remove something in the generated C++ source code (generated by the Fordiac IDE) so that the FB will behave properly in simulation with the compiled FORTE?

Regards,
Udayanto
Re: Publish/Subscribe and Client/Server FBs with more SDs and RDs inputs and outputs [message #1790174 is a reply to message #1790171] Wed, 06 June 2018 13:19 Go to previous messageGo to next message
Martin Melik-Merkumians is currently offline Martin Melik-MerkumiansFriend
Messages: 45
Registered: March 2016
Member
Hi Udayanto,

you do not need to export communication FBs. There is a generic comm FB which parses the FB name and generates the needed type on the fly based on its name (e.g. PUBLISH_15 = 15 SDs, or SERVER_6_12 = 6 SDs & 12 RDs)

Best regards,
Martin
Re: Publish/Subscribe and Client/Server FBs with more SDs and RDs inputs and outputs [message #1790210 is a reply to message #1790174] Thu, 07 June 2018 06:26 Go to previous messageGo to next message
Udayanto Dwi Atmojo is currently offline Udayanto Dwi AtmojoFriend
Messages: 4
Registered: March 2018
Junior Member
Hello Martin,

Which one is this generic comm FB that you mentioned in the FORDIAC IDE?

Cheers,
Udayanto
Re: Publish/Subscribe and Client/Server FBs with more SDs and RDs inputs and outputs [message #1790212 is a reply to message #1790210] Thu, 07 June 2018 06:33 Go to previous messageGo to next message
Jose Maria Jesus Cabral Lassalle is currently offline Jose Maria Jesus Cabral LassalleFriend
Messages: 101
Registered: February 2016
Senior Member
Hi,

in the IDE you just need to create the FB with the interface that's similar to any CLIENT_X_Y or SUBSCRIBE_X or whatever. That is, your function block should have the same events, QI, QO, STATUS, and then RD_X and SD_Y should be according to the type you're creating. THe name of the type is what the rte will check to create the FB.
Re: Publish/Subscribe and Client/Server FBs with more SDs and RDs inputs and outputs [message #1790213 is a reply to message #1790210] Thu, 07 June 2018 06:39 Go to previous message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 634
Registered: January 2014
Senior Member
Hi,

Martin meant that all comm fbs (CLIENT, SERVER, PUBLISH, SUBSCRIBE) are implemented in a generic way in FORTE. As Martin said during deployment FORTE takes the given specific type name of a com FB (e.g., PUBLISH_20) and dynamically creates a publisher with 20 inputs.

To utilize this from 4diac-ide you need to create an according type specification. The easiest way is to copy an existing com FB (e.g., PUBLISH_6), rename it to the type you need (e.g., PUBLISH_15) and create adjust the interface to meet the type (e..g, create the missing SD_7 to SD_15, and the with). You do not need to create an C++ code for this new type. You can just use it in your application and the rest will happen automagically.

We have some ideas that generic types like the comFBs can be created dynamically in the application, ie.., you drag a PUBLISH block into your application and then expand it to how many inputs you need. However we are missing here some definitions in the XML file and haven't found time for it.

Cheers,
Alois
Previous Topic:How to customize devices?
Next Topic:Error while building FORTE with Open62541 in Linux Ubuntu 14.04 32bit LTS
Goto Forum:
  


Current Time: Sat Sep 22 10:41:24 GMT 2018

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

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

Back to the top