Integrating the code generated from simulink in the project -


i have simulink model , generate code using simulink coder generic real-time target. copy generated files (*.c , *.h) project in mplab. here have main.c file , here use mdlstart() initializing model 1 time , in infinite loop use mdloutputs() , mdlupdate() running model. works fine.

now want speed execution of model , therefore want split model sub-systems , execute sub-system when required (e.g. want execute sub-systems everytime , every few ms instead of everytime). split model subsystems , made every sub-system atomic different function every sub-system. these different sub-system's functions called mdloutputs() , mdlupdate(). execute everytime model executed.

actually want use timer in mplab project , execute few sub-systems lets @ every 100ms. not want modify auto-generated *.c , *.h files.

so instead of executing these sub-system's functions everytime through mdloutputs() , mdlupdate(), possible call sub-system's functions main.c file without touching auto-generated *.c , *.h files?

i hope have explained well.

waiting help.

you should try model trying subsystems inside simulink. example, can use "enabled subsystems" or "triggered subsystems" create subsystems run on time steps. not sure kind of timer referring to. if simulink time need run different subsystems @ different sample rates give multirate model. if timer external source, try triggered or enabled subsystems. best way avoid modifying generated files.

doc these subsystems @ http://www.mathworks.com/help/simulink/conditional-subsystems-1.html.


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -