Documentation Center

  • Trial Software
  • Product Updates

Strip Chart Library

Library Overview

The Strip Chart block displays numeric data as if it were being output by pens moving on a strip of paper. The library provides stamps, tracks and track bands, and an X axis as display elements.

As with other preconfigured Gauges Blockset™ blocks, you can configure the Strip Chart block using properties in its dialog box. However, to plot data on the chart, you must invoke methods for the block using the MATLAB® invoke command.

Plotting on a Strip Chart

A MATLAB S-function provided with Gauges Blockset software plots data on the Strip Chart block by using the invoke method. More generally, this S-function illustrates how to communicate with any Microsoft® ActiveX® control through a MATLAB S-function.

The file is called ax_strip_sfun.m and you can use the following MATLAB command to view the contents of the file.

edit ax_strip_sfun

During initialization, the Simulink® block attributes (sample time, input width, etc.) are configured and the Strip Chart configuration is set. The infrastructure of Gauges Blockset software provides the handle of the control (hActX) and is available in this S-function.

You can use this handle to set the properties of the Strip Chart through the standard dot notation. For example, the following line sets the LastX property of the Strip Chart to zero.

hActx.LastX = 0;

Any property of the Strip Chart can be set in this fashion.

In the outputs section of the S-function, each track of the Strip Chart is initialized to zero on the time axes and the actual plotting of the data is performed. A loop in this section accounts for input signals that are vectors instead of scalars.

Was this topic helpful?