36 | 50
Installation Manual LOGS50 EN_MI_090221
2
FUNCTIONONALITIES
This chapter intends to establish a schematic diagram of the LOGS50 task
management and the three main functionalities of the device which are
:
Master mode
Slave mode
Alarms notice
2.1. TASK MANAGEMENT
LOGS50 unit has an internal mechanism of control that allows an efficient
management of the tasks. Such control is based in three processes (or
functions) detailed below:
The TaskManager function determines which tasks are to be executed in
every instant either because the starting time established in the configuration
for this task to perform has arrived or because an event that trigger the task
has occurred or both reasons. This function will label the tasks as likely
candidates to be executed.
The second function called TaskScheduller decides which of all tasks to be
executed at the same time goes first.
At last, there is another function called GetUsedDevices that determines the
device needed to execute the task and set it aside for its use. It is not
allowed the execution of tasks that share the same resource. A resource can
be the communication channel, storage memory, etc.
The process Works as follows: the TaskScheduller function, based on priorities,
decides which task from all the tasks the function TaskManager has declared as
ready must be executed. This decision is made in a way that if two tasks with
the same priority coexist, both will be executed alternately, providing they do not
use the same resource. If they use it, the first one to be executed reserves for
itself the resource not realizing it until the task is completed- For example, the
communication module. Doing so, likely conflicts among tasks that use the
same resource are avoided. The way of acting in this case is postponing the
rest of the tasks that should be executed at the same time, but their execution is
incompatible with the ongoing task. In this case, a task does not start until the
other is finished.
The tasks, as stated before, are executed because they have been previously
programmed so by means of repetition patterns or because an event has
occurred. If the task is associated with an event it will be executed as soon as
the event is triggered, i.e., when it occurs a transition from “false” to “true” and
only will be executed once even if it remains as “true” during more time. It will
not be executed again until a new transition from false to true occur.
However, if a task is associated with a time repetition pattern and with an event
at the same time, the event will always be taken as an inhibiting element