|Code Listing by Gustavo Baldo Carvalho|
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...
Very often we create Busses in Simulink blocks that later need to be treated more seriously with Busobjects.
Here there is an example for doing the Bus Object automatically from the block definition without using Bus editor manually.
By configuring BusObjects in the signal type of a constant (might also work for input ports!), Simulink can import structure data from structure variables in workspace.
Only for 2010b and later!!
All files and free downloads are copyright of their respective owners. We do not provide any hacked, cracked, illegal, pirated version of scripts, codes, components downloads. All files are downloaded from the publishers website, our file servers or download mirrors. Always Virus check files downloaded from the web specially zip, rar, exe, trial, full versions etc. Download links from rapidshare, depositfiles, megaupload etc not published.