Asynchronous Event Modeling via Model Inputs (VxWorks® OS)

This model shows how to simulate and generate code for asynchronous events on a real-time multitasking system.

Open Example Model

Open the example model rtwdemo_async_mdlreftop.


Explore Example Model

The two asynchronous events, Interrupt1 and Interrupt2, are executed in the referenced model via two different function-call input ports. The code generated for these blocks is specifically tailored for the VxWorks® operating system. However, you can modify the Async Interrupt block to generate code specific to your environment whether or not you are using an operating system.

Data Transfer Assumptions

Basis of operation for data transfers between tasks:

  1. Data transitions occur between a single reading task and a single writing task.

  2. A read or write of a byte sized variable is atomic.

  3. When two tasks interact through a data transition, only one of them can preempt the other.

  4. For periodic tasks, the faster rate task has higher priority than the slower rate task; the faster rate task always preempts the slower rate task.

  5. All tasks run on a single processor. Time slicing is not allowed.

  6. Processes do not crash/restart (especially while data is being transferred between tasks)

Was this topic helpful?