Introduction to Simulink with Engineering Applicatioins, Second Edition

Chapter 15: The Sources Library

Overview

This chapter is an introduction to the Sources library. This is the fourteenth library in the Simulink group of libraries and consists of two sub-libraries, the Model & Subsystem Inputs Sub-Library, and the Signal Generators Sub-Library blocks shown below. Their functions are illustrated with examples.

15.1 Models and Subsystems Inputs Sub-Library

The Models and Subsystems Inputs Sub-Library contains the blocks described in Subsections 15.1.1 through 15.1.4 below.

15.1.1 The Inport Block

The Inport block creates an input port for a subsystem or an external input. This block is described in Section 2.1, Chapter 2.

15.1.2 The Ground Block

The Ground block grounds an unconnected input port. This block is described in Section 2.2, Chapter 2.

15.1.3 The From File Block

The From File block outputs data read from a MAT file. The name of the file is displayed inside the block. An example using the From File block and the To File block is presented in Subsection 14.1.3, Chapter 14.

15.1.4 The From Workspace Block

The From Workspace block reads data from the MATLAB workspace. The workspace data are specified in the block's Data parameter via a MATLAB expression that evaluates to a 2-D array.

Example 15.1

For the model in Figure 15.1, the MATLAB workspace contains the statement


Figure 15.1: Model for Example 15.1

t=1:10;u=log10(t);

In the Display block, the first 10 values are those specified by t, and the last ten values are those specified by

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Programmable Logic Controllers (PLC)
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.