Code covered by the BSD License  

Highlights from
S-functions x HugeBus with BusObj as Workaround for "Input Bounds are out of range"

Be the first to rate this file! 5 Downloads (last 30 days) File Size: 92.75 KB File ID: #25936
image thumbnail

S-functions x HugeBus with BusObj as Workaround for "Input Bounds are out of range"

by Gustavo Baldo Carvalho

 

23 Nov 2009 (Updated 05 May 2011)

Example showing a workaround for "Input Bounds are out of range" using BusObjects.

| Watch this File

File Information
Description

When automatically generating S-functions with RTW, if a BusObject is not used by Bus Creators, the S-function does not handle Bus inside C code, but through block interface. To see that, right click and select Look Under Mask in the resulting Block.
This may pose a problem if the Bus is somehow big.
This is because the automatic S-function/Bus definition interface has so many outputs (1 for each signal in the Bus) that it goes beyond block position limit in Simulink.
To workaround this problem, we may use BusObject in the Bus Creators, allowing then RTW to handle Buses in the C code, without needing to create a huge Block interface outside. Thus a
Bus is treat as an unique output signal from S-functions.

Required Products Simulink
MATLAB release MATLAB 7.7 (R2008b)
Other requirements I used MS Visual Studio 9 C++ compiler on a WinXP Pro 2002 SP2 with R2008b.
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Updates
05 May 2011

Better description

Tag Activity for this File
Tag Applied By Date/Time
bus busobject sfunctions rtw position limit Gustavo Baldo Carvalho 24 Nov 2009 09:49:06
bus busobject sfunctions rtw position limit suzan 09 Aug 2011 22:17:16

Contact us at files@mathworks.com