Identifying function blocks individually within the code [message #1834018] |
Fri, 30 October 2020 10:09 |
Shobhit Mishra Messages: 7 Registered: September 2020 |
Junior Member |
|
|
Hi,
I am using a simple blink example with a redundant application. I wish to send a stream on each individual FB and wished to see if there was a way to identify them through the code. for example, I want to check if the FB is E_SWITCH then perform some task, and then check if the FB is E_SWITCH_1 and then perform something else. Is there a way to do so?
[Updated on: Fri, 30 October 2020 11:56] Report message to a moderator
|
|
|
Re: Identifying function blocks individually within the code [message #1834036 is a reply to message #1834018] |
Fri, 30 October 2020 14:50 |
|
hi,
can you please expand a bit on what you mean with sending a stream on each individual FB?
Regarding the identification of individual FBs: In 4diac FORTE each FB type is a class and each FB instance will be an instance of this class. In the C++ code you can access the instance name of the FB and us that for identification.
If you would like to get event streams a hook can be the code in the CFunctionblock base class where input events are received and outputevents are sent.
I hope this is in the direction that you asked.
BR,
Alois
|
|
|
|
Re: Identifying function blocks individually within the code [message #1834042 is a reply to message #1834038] |
Fri, 30 October 2020 19:31 |
|
Ah thanks for the clarification. IEC 61499 states that FBs are encapsulated and they will behave the same independent to whom they are connected. Given your setup I think it would make more sense to have a dedicated configuration parameter as part of your receiving layer (I think it is also better to not modify our udp receiving code but have a dedicated layer on top which handles that, I remember Mario de Sousa had a nice paper on that topic). Or if that is not what you want better check on resource or devices. Although I think the first option is better configureable by the user.
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03712 seconds