EXEC – Real-time executive

Block SymbolLicensing group: STANDARD
Qt SVG Document Exported by REXYGEN Studio Modules Drivers Archives QTask Level0 Level1 Level2 Level3 EXEC

Function Description
The EXEC block is a cornerstone of the so-called project main file in the .mdl format, which configures individual subsystems of the REXYGEN system. No similar block can be found in the Matlab-Simulink system. The EXEC block and all connected configuration blocks do not implement any mathematic algorithm. Such configuration structure is used by the REXYGEN Compiler compiler during building of the overall REXYGEN control system application.

The REXYGEN system configuration consists of modules (Modules), input/output drivers (Drivers), archive subsystem (Archives) and real-time subsystem, which includes quick computation tasks (see the QTASK function block description for details) and four priority levels (Level0 to Level3) for inserting computation tasks (see the TASK function block description for details).

The base (shortest) period of the application is determined by the tick parameter. This value is checked by the REXYGEN Compiler compiler as its limits vary by selected target platform. Generally speaking, the lower period is used, the higher computational requirements of the REXYGEN system runtime core (RexCore) are.

The periods of individual computation levels (Level0 to Level3) are determined by multiplying the base period tick by the parameters ntick0 to ntick3. Parameters pri0 to pri3 are the logical priorities of corresponding computation levels in the REXYGEN system. The REXYGEN system uses 32 logical priorities, which are internally mapped to the target platform operating system dependent priorities. The highest logical priority of the REXYGEN system is 0, the value 31 means the lowest. Should two tasks with different priorities run at the same time, the lower priority (higher value) task would be interrupted by the higher priority (lower value) task.

The default priorities pri0 to pri3 reflect the commonly accepted idea that the "fast" tasks (short sampling period) should have higher priority than the "slow" ones (the so-called Rate monotonic scheduling). This means that the default priorities need not to be changed in most cases. Impetuous changes can lead to unpredictable effects!

On multi-core CPUs, the parameters cpu_rt and cpu_other can be used to reserve a core for real-time tasks (e.g. Drivers and Levels) and a core for other REXYGEN tasks (e.g. diagnostics or web server). After filling the parameter on a given CPU, only the defined REXYGEN tasks will run. Furthermore, the parameters cpu0 to cpu3 can be used to assign a core to a given Level. The CPUs are numbered starting from 0, where -1 means the default setting. The parameters cpu0-3 have priority over cpu_rt and cpu_other.

This block does not propagate the signal quality. More information can be found in the 1.4 section.

Parameter

target

target  Generic target device

String

tick

Base tick (period) of the runtime core [s]  0.05

Double (F64)

ntick0..ntick3

Period of tasks in Level0 (tick*ntick0)   1 10

Long (I32)

pri0..pri3

Priority of tasks in Level0   3  31 5

Long (I32)

cpu_rt

Default CPU core for real-time tasks (-1=default, 0=core 0, 1=core 1, ...)   -1  127 -1

Long (I32)

cpu_other

Default CPU core for non real-time tasks (-1=default, 0=core 0, 1=core 1, ...)   -1  127 -1

Long (I32)

cpu0..cpu3

Level0 tasks CPU core (-1=default, 0=core 0, 1=core 1, ...)   -1  127 -1

Long (I32)

Output

Modules

Anchor for chain of modules

Long (I32)

Drivers

Anchor for chain of I/O drivers

Long (I32)

Archives

Anchor for chain of archives

Long (I32)

QTask

Anchor for connecting a quick task

Long (I32)

Level0..Level3

Anchor for chain of Level0 tasks

Long (I32)

2024 © REX Controls s.r.o., www.rexygen.com