Main Content

Use Blockset Designer to Create, Organize, and Share a Custom Blockset

This example shows how to create, organize, and share a Simulink® blockset using Blockset Designer. A blockset is a collection of blocks organized in Simulink® libraries. The blockset in this example contains blocks that model and simulate the thermal management of a house.

Blockset Designer is a project-based environment to create a Simulink blockset. Blockset Designer allows you to develop and maintain Simulink blockset artifacts, such as source code, TLC files, build scripts, test suites, libraries, models, and documentation, using a single tool. This example demonstrates how you can use Blockset Designer as an end-to-end tool for creating, organizing and sharing Simulink® blocksets.

Open the Blockset Designer Project

Open the Simulink Blockset Designer project.

Add Blocks the Blockset

You can add blocks to the blockset using the block templates provided under in Add section. You can also add a sublibrary from the section and group blocks within it.

Add or remove blocks from a sublibrary by dragging and dropping blocks into desired library or sublibrary on the Blockset Browser pane. For more information on creating a blockset project, see Create a Blockset Project.

In this example, the blockset contains sublibraries that model the algorithms and devices associated with thermal management of a house and a thermodynamic model of a house. The Algorithms sublibrary contains blocks that model energy-to-cost and heat flow-to-energy algorithms. The Devices sublibrary contains blocks that model heater and thermostat devices. The House block implements a thermodynamic model of a house.

Add Blockset Artifacts

Within the Algorithms sublibrary, The Energy2Cost block is implemented as a MATLAB System and converts energy to cost according to the specified block parameters. The Flow2Energy block is implemented as a C Mex S-Function and calculates the energy used by the thermal management system over time.

The devices are modeled in Simulink using native Simulink blocks and are packaged into a Simulink subsystem.

The house is modeled using native Simulink blocks and is packaged as a Simulink subsystem.

To access specific options and artifacts of a sublibrary or block, select the the sunblibrary or block from the list in the Blockset Browser pane. For more information on specific block options and their associated artifacts, see Create and Organize Block Artifacts.

The complete thermal management is modeled and simulated in the parent model HouseThermalExample contained within the project.

Share the Blockset

After creating the blockset and adding all related artifacts, you can publish and share the blockset as a toolbox. For more information, see Publish the Created Blockset.

See Also

| | |