4. INITIAL PROGRAMMING
In this project profile, the application may also include the user task FreeTask of the Freewheeling type with priority 31,
responsible for the FreePrg program execution. As this task is low priority it can be interrupted by all others so it can execute
codes that might be blocked.
There are eight tasks already fully defined, as shown in table below, as well as their associated programs in the chosen
language. Intervals and trigger events of any task, as well as the priorities of the event tasks can be configured by the user.
When developing the application using Expert project’s profile, a special care is needed with the event tasks scaling. If
there is information and resource sharing between these tasks or between them and the basic tasks, it is strongly recommended
to adopt strategies to ensure data consistency.
Tasks POU Priority Type Interval Event
MainTask MainPrg 13 Cyclic 20 ms -
CyclicTask00 CyclicPrg00 13 Cyclic 200 ms -
CyclicTask01 CyclicPrg01 13 Cyclic 500 ms -
ExternInterruptTask00 ExternInterruptPrg00 02 External - IO_EVT_0
TimeInterruptTask00 TimeInterruptPrg00 01 Cyclic 20 ms -
ExternInterruptTask01 ExternInterruptPrg01 11 External - IO_EVT_1
TimeInterruptTask01 TimeInterruptPrg01 09 Cyclic 30 ms -
FreeTask FreePrg 31 Continuous - -
Table 36: Expert Profile Tasks
4.2.5. Custom
The Custom project profile allows the developer to explore all the potential of the Runtime System implemented in the
Nexto Series central processing units. No functionality is disabled; no priority, task and programs association or nomenclatures
are imposed. The only exception is for MainTask, which must always exist with this name in this Profile.
Beyond the real time tasks, with priority between 00 and 15, which are scheduled by priority, in this profile it is also
possible to define tasks with lower priorities in the range 16 to 31. In this range, it’s used the Completely Fair Scheduler (time
sharing), which is necessary to run codes that can be locked (for example, use of sockets).
The developer is free to partially follow or not the organization defined in other project profiles, according to the charac-
teristics of the application. On the other hand, the Custom model associated with this profile needs no pre-defining elements
such as task, program or parameter, leaving the developer to create all the elements that make up the application. However, the
user can generate the same elements available for the Expert profile.
Tasks POU Priority Type Interval Event
MainTask MainPrg 13 Cyclic 20 ms -
CyclicTask00 CyclicPrg00 13 Cyclic 200 ms -
CyclicTask01 CyclicPrg01 13 Cyclic 500 ms -
ExternInterruptTask00 ExternInterruptPrg00 02 External - IO_EVT_0
TimeInterruptTask00 TimeInterruptPrg00 01 Cyclic 20 ms -
ExternInterruptTask01 ExternInterruptPrg01 11 External - IO_EVT_1
TimeInterruptTask01 TimeInterruptPrg01 09 Cyclic 30 ms -
FreeTask FreePrg 31 Continuous - -
Table 37: Custom Profile Tasks
4.2.6. Machine Profile
In the Machine Profile, by default, the application has a user task of the Cyclic type called MainTask. This task is respon-
sible for implementing a single Program type POU called MainPrg. This program can call other programming units of the
Program, Function or Function Block types, but any user code will run exclusively by MainTask.
This profile is characterized by allowing shorter intervals in the MainTask, allowing faster execution of user code. This
optimization is possible because MainTask also performs the processing of the bus. This way, different from other profiles, the
machine profile requires no context switch for the bus treatment, which reduces the overall processing time.
36