Embedded Target for Motorola MPC555    

Rebuilding the Controller and Cosimulating

You are now ready to rebuild the PIL code and library components. This time, however, you will build from the Configurable Subsystem, which must be linked back to the fuel rate controller subsystem in the library. Before continuing, right-click on the Configurable Subsystem and make sure that, in the Block choice submenu of the context menu, fuel rate controller is selected. Do not select fuel rate controller (SIL) or fuel rate controller (PIL).

To rebuild the PIL code and library components:

  1. Right-click on the Configurable Subsystem, and select Build Subsystem from the Real-Time Workshop submenu of the context menu.
  2. The build process proceeds as described in the previous tutorial (see Building PIL and Simulation Components if necessary). At the end of the build process, the fuel_lib library is again activated. Observe that the rebuilt SIL and PIL components now have two outports, like the original subsystem from which they were generated, as shown in this figure.

  1. The PIL code has been downloaded to the target; you can now cosimulate again with the rebuilt PIL code. As before, right-click on the Configurable Subsystem in the model, and select fuel rate controller (PIL) from the Block choice submenu of the context menu.
  2. Open all the model's Scope blocks, if they are not already opened.
  3. Make sure that Simulink is in Normal mode.
  4. Click the Start simulation button in the Simulink toolbar.
  1. Observe the signals displayed on the scopes. The fuel with offset scope and the Metered Fuel scope should display signals that are identical except for their offsets. Otherwise, all signals should be identical to the signals generated by the previous cosimulation.

  1. Clean up by terminating the program on the target system, and exiting your cross-development system. Save the model if desired.

In the next section, you will use the other components of the fuel_lib library in simulations.


  Modifying the Controller Tutorial 3: Using the Demo Model In Simulation