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 » emBRICK modul(IO Mapper with the example of emBRICK)
emBRICK modul [message #1779302] Fri, 05 January 2018 06:15 Go to next message
Michael G. is currently offline Michael G.Friend
Messages: 10
Registered: December 2017
Junior Member
Hi 4DIAC Team,

i´m looking for the right FB´s for the emBrick modul.
I would like to do such an I/O mapper myself,
the emBRICK modul from Johannes Meßner in FORTE looks a bit complicated...

Maybe there is a simple example or documentation for this IO mapper.

My goal is to configurate the I/Os (bus,gpio,spi,i2c,adc...) via FB´s,
after that you can use the standard IX/QX Blocks an this link over the instaceName.


Best regards from Styria.
Re: emBRICK modul [message #1779417 is a reply to message #1779302] Sat, 06 January 2018 21:53 Go to previous messageGo to next message
Carolyn Oates is currently offline Carolyn OatesFriend
Messages: 1
Registered: January 2018
Junior Member
You already have Johannes Meßmer's presentation Handling a modular IO System in embedded IEC 61499 Controllers -right ?
Re: emBRICK modul [message #1779453 is a reply to message #1779302] Mon, 08 January 2018 10:00 Go to previous messageGo to next message
Jose Maria Jesus Cabral Lassalle is currently offline Jose Maria Jesus Cabral LassalleFriend
Messages: 199
Registered: February 2016
Senior Member
Hi,

Can you give more information about what exactly are you planning to implement?

If you want to use the embrick hardware, you shouldn't need anything else. Everything should be there, unless you want new modules that aren't implemented yet.

Unfortunately, there isn't any documentation yet about the new module's architecture. I started looking at it to have an understanding. I uploaded an image with the most important classes and relations between them. I'll try to give below some information about it to see if it's understandable for the later documentation:

The ConfigFB are all classes related to the configuration FBs that are mapped in 4DIAC in a separated resource (where you write the name of the IX in the data inputs). Normally you have a master and many slaves. The master communicates with the slaves and most important, it creates the DeviceController when initializes. The DeviceController is the only part of the code that actually interacts with the Hardware, the rest interacts with the DeviceController.

The Mapper is an independent part of the code that just takes the IX/QX and similar from one side, and the Handlers from the ConfigFB from the other side, and when he finds the same name, it connects them, veryfing direction and repetition.

So when the Configuration FBs are initialized, the DeviceController is created, and each module of the ConfigFB reads the names given in its inputs and creates a HandleDescriptor that is known to the DeviceController. The HandleDescriptor is passed from the slave to the master, and from the master to the DeviceControlller. The DeviceController finally creates a Handle from the HandleDescriptor and passes this new Handle to the mapper, which will then make the connection to the IX/QX with the same name.

In a normal running, when you want to write a QX for example, through the processInterface, the QX calls the Handle to write a value, which in turn updates its value and tells the DeviceController that a new value has been written. The DeviceController then writes the value to the actual Hardware.

For the inputs, the DeviceController is checking constantly in its own thread the input Handles for new values, and when there's one, it lets the Handle know about it, which then calls the IX/IW to update its IN data output, and finally the DeviceController starts the new event chain from the IX.

The amount of classes can be overwhelming at the beggining, but most of them are doing all the job, so you just need to implement less code.

I hope this make things cleared than before.

Regarding the i2c, spi, gpio and so on, probably a good architecture would be to have a master for each one of them, so you could easily connect slaves to them and would be easi to understand the architecture.

Regards,

Jose
Re: emBRICK modul [message #1779469 is a reply to message #1779453] Mon, 08 January 2018 11:16 Go to previous messageGo to next message
Michael G. is currently offline Michael G.Friend
Messages: 10
Registered: December 2017
Junior Member
Hi Jose,

i just wanted to use the EMbrick as a template,
i want to configure our own IO´s with 4DIAC.

Mr. Zoitl has shown me this module and made me friendly on it, but i have not yet come to the right...

My solution currently looks like this:
> i have mapped our IOs to groups in FB´s
> in this FBs the interfaced to read/write are initialized
> each IO has a unique ID and gets a name from this config-FB
> the IO block, like QX check on init if her param compare from this IO-list and saved the ID from there
> the ID is used to decide wich function is made for read/write

So i can with configuration blocks (SIFB) assign all my inputs,outputs,modules etc...

Best regards

[Updated on: Mon, 08 January 2018 11:21]

Report message to a moderator

Re: emBRICK modul [message #1779527 is a reply to message #1779469] Tue, 09 January 2018 09:24 Go to previous messageGo to next message
Jose Maria Jesus Cabral Lassalle is currently offline Jose Maria Jesus Cabral LassalleFriend
Messages: 199
Registered: February 2016
Senior Member
Hi,

I'm still not sure at what stage of your implementation you are and what are you looking for. What you explain in the state of your solution seems to be what's already implemented in Forte.

For a new hardware you'll need to implement a Config-FB and a DeviceController in C++. The ConfigFB classes is already prepared for a Master-Slave concept so you need to inheritate and implement what's missing, and you could use the Embrick as an example. The same applies for the DeviceController.

Regards,
Re: emBRICK modul [message #1779604 is a reply to message #1779527] Wed, 10 January 2018 08:54 Go to previous message
Michael G. is currently offline Michael G.Friend
Messages: 10
Registered: December 2017
Junior Member
Hi Jose,

OK but where i get the EMBrick FB´s?
Previous Topic:4DIAC-IDE FBs library
Next Topic: Build Forte error using libmodbus
Goto Forum:
  


Current Time: Fri Apr 19 22:40:25 GMT 2024

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

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

Back to the top