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 » Internal Event Vs External Event(How internal events are different from external events)
Internal Event Vs External Event [message #1728476] Mon, 04 April 2016 16:30 Go to next message
yuvaraj velumani is currently offline yuvaraj velumaniFriend
Messages: 15
Registered: April 2016
Junior Member
Hi,

I am trying to understand the forte open source code. I found that forte can handle only 10 external events which are from any socket and timed function blocks.

But while looking in depth onto the code, I couldn't able to find how the internal event are different from external events. Basically how it is differentiated. I see code of receive Input Event on event chain execution thread is only one and how and where it is differentiated as internal event and external events.

Re: Internal Event Vs External Event [message #1728548 is a reply to message #1728476] Tue, 05 April 2016 11:18 Go to previous message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1585
Registered: January 2014
Senior Member

Hi,

external events are all events that are initiated from something outside of the application (examples are interrupts like timing or a message received on the network). Such events are in FORTE handled by a so called external event handler which determines for which FB the external event is. Normally external events are handled by own threads or interrupt service routines. These are not allowed to trigger internal events (e.g., an output event of an FB). Therefore each event chain execution thread has a second list of external events that will be merged with the normal events. Normally it would be possible to queue external events and internal events in the same queue however having two lists allows to use less locking and therefore we could improve the execution performance. The size of ten means that 10 external events can be buffered before they will be copied into the normal execution queue. From which they will be delivered to the FB to process them. This size is determined by how long a typically application FB will execute. 10 is normally fine. If you get the error message external event queue full then you either have an issue with your application FBs (please note FBs must not block) or you should increase the external event queue size in the according CMAKE option.

This brings us now to the internal events. Internal events are all events that a FB will receive or produce as part of the application. Internal events are stored in queue and delivered in a FIFO way. Normally at each resource has on event queue with an own thread executing this queue. With real-time event function blocks you can add more queues to a resource/application allowing to execute event chains in parallel.

More details on the background and design of FORTE can be found in this book http://www.amazon.de/Real-Time-Execution-61499-Alois-Zoitl/dp/1934394270/ref=sr_1_3?ie=UTF8&qid=1438845779&sr=8-3&keywords=zoitl

I hope this helps,
Alois

Previous Topic:Problem with QX in Raspberry pi
Next Topic:Petri Nets
Goto Forum:
  


Current Time: Fri Apr 26 02:56:52 GMT 2024

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

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

Back to the top