Can a bus be an IN/OUT variable with partial assignment in the resultant generated code
Mostrar comentarios más antiguos
How do you make the Simulink generated C Code update a single item from a bus without re-assigning the whole bus?
I have a model which takes in a bus with many elements and updates a single entry in the bus which is then output. The output is routed to the next model block for additional computations.
I am trying to compile this atomic model into a stand-alone ERT library. I setup the input and output parameters to be pass-by-reference but can't find anything that would let the generator treat the input and output variables as one.
When the generated *_step function ends, it assigns all of the output entries to the input values which is essentially:
(*pParam) = (*pParam);
I am trying to get Matlab to write-back the computed value into the input bus for it to be sent on its merry way.
Respuesta aceptada
Más respuestas (1)
John
el 21 de Nov. de 2016
0 votos
Categorías
Más información sobre Simulink Coder en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!