Real-Time Workshop User's Guide    

Subsystem Code Sublibrary

The Subsystem Code sublibrary contains eight blocks to insert critical code sections into system functions.

Each of these blocks has a dialog box containing two text fields that allow you to place data at the top and the bottom of system functions. The eight blocks are:

The location of the block in your model determines the location of the custom code. In other words, the code is local to the subsystem that you select. For example, the Subsystem Outputs block places code in mdlOutputs when the code block resides in the root model. If the Subsystem Outputs block resides in a triggered or enabled subsystem, however, the code is placed in the subsystem's Outputs function.

The ordering for a triggered or enabled system is:

  1. Output entry
  2. Output exit
  3. Update entry
  4. Update exit code


 Model Code Sublibrary Asynchronous Support