TASK – Standard task of the REXYGEN system

Block SymbolLicensing group: STANDARD
PIC

Function Description
The overall control algorithm of the REXYGEN system consists of individual tasks. These are included by using the TASK block. There can be one or more tasks in the control algorithm. The REXYGEN system contains four main computational levels represented by the Level0 to Level3 outputs of the EXEC block. The individual tasks are added to the given computational level <i> by connecting the prev input with the corresponding Level<i> output or with the next output of a TASK, which is already included in the given level <i>. There can be only one task connected to the next output of the TASK block. The next output of the last task in the given level remains unconnected. This means that the tasks in one level create a unidirectional chain which defines the order of initialization and execution of the individual tasks of the given level in the REXYGEN system. The individual levels are ordered from Level0 to Level3 (the QTASK block precedes Level0).

All the tasks of the given level <i> are executed with the same priority given by the pri<i> parameter of the EXEC block. The execution period of the task is given by a multiple of the factor parameter and the base tick of the given level <i> ntick<i>tick in the EXEC block. The time allocated for the task to execute starts at the start tick and ends at the stop tick, where the inequality 0 start < stop ntick<i> must hold for the start and stop parameters. The REXYGEN Compiler compiler further checks whether the stop parameter of the preceding task is less or equal to the stop parameter of the succeeding task, i.e. the allocated time intervals for individual tasks cannot overlap. In the case the timing of individual levels is inappropriate, the tasks are interrupted by tasks and other events with higher priority and might not execute in the allocated time. In such a case the execution is not aborted but delayed (in contrary to the QTASK block). The REXYGEN Diagnostics program diagnoses whether the execution delay is occasional or permanent (the Level and Task tabs).

Input

prev

Input for connecting the task with the corresponding Level<i> output of the EXEC block or with the next output of the preceding task of the given level

Long (I32)

Output

next

Output for connecting to the prev input of the succeeding task in the given level

Long (I32)

Parameters

factor

Execution factor; multiple of the execution period of the i-th level of the EXEC block defining the execution period of the task: factortickntick<i>  1

Long (I32)

start

Number of tick of the given computational level which should trigger the task execution   0  ntick<i> 0

Long (I32)

stop

Number of tick of the given computational level by which the task execution should finish   start+1  ntick<i> 1

Long (I32)

stack

Stack size [bytes]  10240

Long (I32)

filename

Name of the file with the .mdl extension which contains the task algorithm. In the case filename is not specified, the filename is given by the name of the TASK block in the project main file (the .mdl extension is attached automatically)

String

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