This content is not included in your SAE MOBILUS subscription, or you are not logged in.
Methods for Interfacing Common Utility Services in Simulink Models Used for Production Code Generation
ISSN: 0148-7191, e-ISSN: 2688-3627
Published April 20, 2009 by SAE International in United States
Annotation ability available
Traditionally, code generated from Simulink models has been incorporated into production applications in a manner similar to hand-written code. As the size of the content created in Simulink has grown, so has the desire to do more integration in Simulink. Integrating content from C/C++ calling environments directly into Simulink blocks rather than just calling external legacy code prevents errors and preserves signal flow visibility in the Simulink models.
Although much of the application content has transitioned to Simulink models, most of the Common Utility Services (e.g., communications, diagnostics, and nonvolatile memory) still exist in C/C++ libraries. While application content changes frequently, Common Utility Service content changes infrequently and is heavily leveraged across many applications. Therefore, it is often desirable to call these Common Utility Services from their existing C/C++ libraries rather than porting them to be generated directly from Simulink models.
Many common services do not fit easily into a constant parameter and dynamic signal flow approach that is typical of Simulink models. This paper examines methods used for creating custom blocks and non- graphically represented code to create a Simulink interface to these Common Utility Services.
CitationThate, J., Kagy, R., Jackey, R., Theyyunni, R. et al., "Methods for Interfacing Common Utility Services in Simulink Models Used for Production Code Generation," SAE Technical Paper 2009-01-0155, 2009, https://doi.org/10.4271/2009-01-0155.
- Thate, Jeffrey M. Kendrick, Larry E. Nadarajah, Siva Caterpillar Automatic Code Generation SAE World Congress, 2004-01-0894 2004
- xPC Target Documentation “CAN I/O Support,” The MathWorks, Inc”
- xPC Target product page The MathWorks, Inc. http://www.mathworks.com/products/xpctarget/
- Real-Time Workshop Documentation “Target Language Compiler (TLC),” The MathWorks, Inc.
- Real-Time Workshop Documentation “Advanced Functions, TLC Function Library Reference, LibGetModelReferenceUserData(),” The MathWorks, Inc.