Friday, January 6, 2012
Simulink Fun
In my day job I write software for embedded control systems - actually most of my time in the last few months has been spent spent working with Simulink Coder. I put a question out there several weeks ago, to which a usable answer was provided within a surprisingly short time. However, only in the last few days has my Simulink expertise advanced to the point to where I actually understood how to get this to work. I already knew how to define mpt.Signal objects with attribute ImportedExtern which would pick up the actual definition from legacy code. But objects defined that way would not be accepted by Simulink as inputs to a Table Lookup block. What I finally realized was that those objects must be defined as mpt.Parameter instead. I also discovered that using n-D Lookup Table (instead of the simplified 2-D Lookup Table) offered some additional flexibility, such as allowing input table data of integer type (as opposed to the default double precision type).
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment