| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Gauges Blockset |
| Contents | Index |
| Learn more about Gauges Blockset |
The interface to the Strip Chart block is different from the interface to the other preconfigured blocks in the Gauges Blockset library. You can configure the Strip Chart block using properties in its dialog box, just as you would for other preconfigured blocks. However, to plot data on the chart, you must invoke methods for the block. You can use the MATLAB command invoke to call methods and pass arguments to them.
An M-file 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 an M-file 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.
Note that S-functions offer more options than those shown in this example. See the Writing S-Functions documentation for more details on writing your own S-functions.
![]() | Percent Indicators | Using Your Own Microsoft ActiveX Control | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |