Embedded Target for Motorola MPC555 |
 |
Modifying the Controller
In this section, we add an output signal and port to the controller subsystem. The changes we make to the controller subsystem in this section are for demonstration purposes; they do not add useful functionality to the model:
- Activate the
fuel_lib
library, and double-click on the original fuel rate controller
subsystem.
- Add a Sum block, a Constant block, and an outport to the
fuel rate controller
subsystem. Configure them such that an offset of 0.5 is summed with the fuel rate signal.
- Route the Sum block output to the new outport, and label the outport
fuel + offset
. The fuel rate controller
subsystem should now resemble this block diagram.
- Close the
fuel rate controller
subsystem. Observe that, in the library window, the fuel rate controller
subsystem now has two outputs, but the SIL and PIL blocks in the library do not. These components will not be updated until the library is rebuilt.
Note
You do not need to remove the Configurable Subsystem from the model to rebuild the code for the SIL and PIL components.
|
- Activate the
mpc555pil_fuelsys
model. Right-click on the Configurable Subsystem in the model. A context menu appears. From the Block choice submenu of the context menu, select fuel rate controller
. Observe that the Configurable Subsystem reflects the change in the corresponding component of the library, showing two outports.
- Add a Scope block to the model and connect it to the new
fuel + offset
outport of the Configurable Subsystem. Label the scope fuel with offset
. The model should now resemble this block diagram.

| Tutorial 2: Modifying and Rebuilding the Controller | | Rebuilding the Controller and Cosimulating |  |