The Tasks State block outputs the current execution state of all scheduled tasks, providing real-time visibility into the multitasking scheduler behavior. Essential for debugging timing issues and verifying task preemption.
% Monitor task execution and detect preemption
% Connect outputs:
TaskID → Display or scope
TaskState → Vector scope (multi-line)
Overload → Alert/LED
% Interpretation:
TaskID = 1 → Base rate task executing
TaskID = 2 → First subrate task executing
TaskID = 0 → Idle task (no scheduled work)
% TaskState example for 3-task system:
[2 1 0] → Task 1 running, Task 2 ready, Task 3 idle
[1 2 0] → Task 1 ready, Task 2 running (preempted Task 1)