Code covered by the BSD License  

Highlights from
ss2sf - Subsystem-to-S Function

3.0

3.0 | 1 rating Rate this file 3 Downloads (last 30 days) File Size: 1.33 KB File ID: #5846
image thumbnail

ss2sf - Subsystem-to-S Function

by Cole Stephens

 

07 Sep 2004 (Updated 20 Oct 2010)

Convert a subsystem to an s-function via the MATLAB command line.

| Watch this File

File Information
Description

Typically, you have to right-click on a subsystem, choose Real Time Workshop -> Generate S-Function in order to replace a standard Simulink subsystem with an S-function.

With ss2sf, you can provide a cell array of subsystem paths and the function will replace the specified subsystems with their s-function equivalents.

Required Products Real-Time Workshop
Simulink
MATLAB release MATLAB 7 (R14)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (1)
10 Apr 2007 Michael Bölling

This works fine when you don't use busses. When a bus is used you can get error messages like this:
'model/subsystem' must be connected to a Bus Creator, Bus Selector or a block that outputs a bus using a bus object. It can also be connected to bus capable blocks that meet the conditions for supporting buses provided the bus entering the block has been created by using a bus creator.

The internal S-Function Generator works somehow different. It seems to split the bus signals into single signals. An information how that works would be appreciated.

Please login to add a comment or rating.
Updates
20 Oct 2010

Added License Info.

Tag Activity for this File
Tag Applied By Date/Time
simulink Cole Stephens 22 Oct 2008 07:31:15
sfunction Cole Stephens 22 Oct 2008 07:31:15
s function Cole Stephens 22 Oct 2008 07:31:15
utility Cole Stephens 22 Oct 2008 07:31:15
rtw Cole Stephens 22 Oct 2008 07:31:15
real time workshop Cole Stephens 22 Oct 2008 07:31:15

Contact us at files@mathworks.com