Instruction manuals

Buses Best Practices Final

Description
MATLAB Busses tutorial and best practices reference manual for use in Matlab and Simulink
Published
of 26
All materials on our website are shared by users. If you have any questions about copyright issues, please report us to resolve them. We are always happy to assist you.
Related Documents
Share
Transcript
  1 Bus best practice guidelines For Models Targeted for Production Code Generation Version 1.0 March 30th, 2009 The MathWorks  2 Introduction .................................................................................................................................................. 5 Notes on the paper ............................................................................................................................... 5 What is a Bus ............................................................................................................................................. 5 Virtual and Nonvirtual Buses ................................................................................................................ 5 Bus Objects............................................................................................................................................ 6 Understanding Bus Objects ................................................................................................................... 6 Storing Bus Objects ............................................................................................................................... 6 Bus Limitations .......................................................................................................................................... 6 Working with Buses .................................................................................................................................. 7 Basic Guidelines ............................................................................................................................................ 7 Bus Diagnostics ......................................................................................................................................... 7 The Bus and Mux Blocks ....................................................................................................................... 8 Use Virtual Buses when Possible .............................................................................................................. 8 When are Nonvirtual Buses Required ................................................................................................... 8 Avoid Non-Local Sub-Buses when working with nonvirtual buses ........................................................... 9 Multi-Rate Buses ..................................................................................................................................... 10 Specifying the Sample Time Rates ...................................................................................................... 12 Setting the Initial Value of Bus Signals .................................................................................................... 12 Simulink ............................................................................................................................................... 12 Stateflow / Embedded MATLAB ......................................................................................................... 13 Buses of Constants .............................................................................................................................. 14 Extract Nonvirtual Bus Signals Inside of Atomic Subsystems ................................................................. 15 Virtual Bus Signals Crossing Atomic Boundaries ..................................................................................... 16 Arrays in Buses are Supported, not Arrays of Buses ............................................................................... 18 Advanced Usage Scenarios ......................................................................................................................... 19 Initializing Data with Persistent information .......................................................................................... 19 Working with Bus Arrays and Reusable Subsystems .............................................................................. 20 Building Bus Arrays in Reusable Subsystems .......................................................................................... 21 Simulink implementation .................................................................................................................... 22 Stateflow Implementation .................................................................................................................. 23 Appendix ..................................................................................................................................................... 24 Terms ...................................................................................................................................................... 24  3 Atomic: ................................................................................................................................................ 24 Buses and S-Functions ............................................................................................................................ 24 Defining Buses in MATLAB-Files .............................................................................................................. 25  4 Author: Michael Burke (mburke@mathworks.com) 
We Need Your Support
Thank you for visiting our website and your interest in our free products and services. We are nonprofit website to share and download documents. To the running of this website, we need your help to support us.

Thanks to everyone for your continued support.

No, Thanks