Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Getting Started with Simulink

You're reading from  Getting Started with Simulink

Product type Book
Published in Oct 2013
Publisher Packt
ISBN-13 9781782171386
Pages 132 pages
Edition 1st Edition
Languages
Concepts
Author (1):
Luca Zamboni Luca Zamboni
Profile icon Luca Zamboni

Summary


In this chapter we've learned what S-functions are and how they can be used to build custom blocks to extend the basic Simulink functionality.

We have learned which required callbacks and optional ones need to be implemented if the S-function will use work vectors to store internal states and allocate system resources.

We developed and built two simple Level 2 MATLAB S-function blocks and used them to interface the cruise controller model with an external application. Then we implemented the same block functionality in the C language, learning how to develop and build C MEX S-functions with the mex tool.

These S-functions can be used as a good starting point to develop other interfaces to communicate with virtually any application or physical device.

With the knowledge acquired in this chapter, we can greatly extend Simulink's functionality by creating new blocks or porting legacy C code to Simulink.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}