Abstract

The VxWorks Task Block is a function-call subsystem which spawns, as a VxWorks task, the function-call subsystem connected to its output. It is meant to be placed between 2 other function-call subsytems. Typically it would be placed between the VxWorks Interrupt Block and a function-call subsystem block or a Stateflow chart. Another example would be to place the Task Block at the output of a Stateflow Diagram which has an Event "Output to Simulink" configured as a function-call. The VxWorks Task Block performs the following functions:

Task Name

Optional name, which if provided, is used as the first argument to the taskSpawn() system call. This name is used by VxWork routines to identify the task they are called from to aid in debugging.

Task Priority

The Task Priority is the VxWorks priority that the function-call subsystem task is given when it is spawned. The priority is can be a very important consideration in relation to other tasks priorities in the 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 that the tasks stack can grow to. The value should be chosen based on the number of local variables in the task.