How can I interface a set of 32-bit hardware registers with a Simulink Model generated using Simulink encoder?
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I have a simulink model that simulates the flight dynamics of a guidance system. The inputs to the model and outputs from the model are relayed to/from a single board computer via a set of 32-bit hardware registers that are accessible on card over a PCI bus.
In general, what would be the best approach? The goal is to minimize the amount of hand-crafting and to minimize the number changes to non-model code everytime changes to the model are made? And what would be the most appropriate MATLAB/Simulink tools for this task?
Thanks in advance.
2 comentarios
Kaustubha Govind
el 15 de Ag. de 2013
Do you have a set of drivers/libraries from the vendor to interface with the registers from, say, a C/C++ application?
Respuesta aceptada
Kaustubha Govind
el 19 de Ag. de 2013
Editada: Kaustubha Govind
el 19 de Ag. de 2013
You can use C-MEX S-functions to create custom driver blocks that call into your C driver code. Please use the Legacy Code Tool to automatically generate an S-function wrapper for your driver code. You can then use the resultant S-function like any other Simulink block.
2 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Simulink Coder en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!