User`s guide

11 Real-Time Workshop Libraries
11-18
VxWorks system. In particular, the default priority of the model code is 30
and, when multitasking is enabled, the priority of the each subrate task
increases by one from the default model base rate. Other task priorities in
the system should also be considered when choosing a task priority.
VxWorks priorities range from 0 to 255 where a lower number is a higher
priority.
Stack Size — The function-call subsystem is spawned with the stack size
specified. This is maximum size to which the task’s stack can grow. The value
should be chosen based on the number of local variables in the task.
By default, Real-Time Workshop limits the number of bytes for local
variables in all of the generated code to 8192 bytes (see
matlabroot/rtw/c/tornado/tornado.tlc). As a rule, providing twice 8192
bytes, 16384, for the one function that is being spawned as a task should be
sufficient.
Task Synchronization Block Example
This example shows a Task Synchronization block as a simple ISR:
The Task Synchronization block inserts this code during the TLC phase of code
generation:
In
MdlStart, the Task Synchronization block is registered by the
Asynchronous Interrupt block as an ISR. The Task Synchronization block