Writing S-Functions Previous page   Next Page

Runtime Object

When Simulink invokes a Level-2 M-file S-function callback method, it passes an instance of Simulink.MSFcnRunTimeBlock class to the method as an argument. This instance, known as the S-function block's runtime object, serves the same purpose for Level-2 M-file S-function callback methods as the SimStruct structure serves for C MEX-file S-function callback methods. It enables the method to provide and obtain information about various elements of the block: ports , parameters, states, and work vectors. The method does this by getting or setting properties or invoking methods of the block runtime object. See the documentation for Simulink.MSFcnRunTimeBlock class for information on getting and setting the runtime object's properties and invoking its methods.


Previous page  Main Method Maintaining Level-1 M-File S-Functions Next page

© 1994-2005 The MathWorks, Inc.