Introduction to Simulink with Engineering Applicatioins, Second Edition

Chapter 14: The Sinks Library

Overview

This chapter is an introduction to the Sinks library. This is the thirteenth library in the Simulink group of libraries and consists of three sub-libraries, the Model & Subsystem Outputs Sub-Library, the Data Viewers Sub-Library, and the Simulation Control Sub-Library blocks shown below. Their functions are illustrated with examples.

14.1 Models and Subsystems Outputs Sub-Library

The Models and Subsystems Outputs Sub-Library contains the blocks described in Subsections 14.1.1 through 14.1.4 below.

14.1.1 The Outport Block

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

14.1.2 The Terminator Block

The Terminator block can be used to cap blocks whose output ports are not connected to other blocks. If we run a simulation with blocks having unconnected output ports, Simulink issues warning messages. We use Terminator blocks to cap those blocks to avoid warning messages. This block is described in Section 2.3, Chapter 2.

14.1.3 The To File Block

The To File block writes its input to a matrix in a MAT-file. The block writes one column for each time step: the first row is the simulation time; the remainder of the column is the input data, one data point for each element in the input vector.

open matrixCToFile.mat
ans =    ans: [4x51 double]

Next, at the MATLAB command prompt we type

whos

and MATLAB outputs

Name        ...

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.