Using Excel® Test Data with Simulink® Inport Blocks

This example shows how to read Excel test data into the SystemTest™ environment and assign individual test signals to Simulink Inport blocks.

The test data in the Excel spreadsheet was generated by Simulink® Design Verifier™.

For the purposes of this example, model coverage is enabled to assess the amount of coverage provided by the test data.

This example requires the following products to run:

  • Simulink

  • Stateflow®

Open the example in the SystemTest desktop.

Simulink Model Overview

The Simulink model is a fuel rate controller with 4 Inport blocks, representing:

  • Throttle angle

  • Speed

  • Exhaust gas (EGO)

  • Manifold absolute pressure (MAP)


Part 1: Read Excel Test Data Into SystemTest

The first step involves reading Excel data into a SystemTest test vector. The following video highlights how to:

  • Create a Spreadsheet Data test vector

  • Configure the Spreadsheet Data test vector to read test data from the Excel file st_fuelctrl_slinports_data.xls

Watch the video (1 min, 59 sec)

Part 2: Map Test Signals to Simulink Inport Blocks

The second step involves assigning test signals read from Excel to individual Simulink Inport blocks. The following video highlights how to:

  • Create a Simulink element

  • Configure the Simulink element with the model demosystest_fuelctrl_slinports_model

  • Map the test signals individually to the root-level Inport blocks

  • Enable model coverage

  • Run the test

Watch the video (2 min, 10 sec)

Was this topic helpful?