How to declare and use local variable in level 2 s-function?
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Ankitkumar Viradiya
el 20 de Nov. de 2017
Comentada: Ankitkumar Viradiya
el 3 de Dic. de 2017
I have a scenario in which I have to connect to client once and then need to use same connection object for further processing. I am planning to connect client in START function in S-function and in same block I want to declare variable which can be access from OUTPUT block for further processing. So please suggest me some way to achieve this or give some reference example. Thanks....
0 comentarios
Respuestas (1)
Mark McBroom
el 26 de Nov. de 2017
You will need to set up a "DWork" variable that gets assigned a value in the mdlStart() function and can then be used in the mdlOutput() function. This link gives details on creating and using a DWork variable in an s-function.
Ver también
Categorías
Más información sobre Simulink Coder en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!