Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

Struct from nonvirtuell Bus

2 visualizaciones (últimos 30 días)
Michael Silvanus
Michael Silvanus el 21 de Ag. de 2016
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
Hello,
I wrote a Matlab System to communicate via a UART interface of the Raspberry Pi. I call the C-functions from the Matalb System with the coder.ceval command. The pidata_parse C-function returns the Data from the UART. For the In- and Ouput of the Matlab System I'm using a nonvirtuell Bus. out is the Name of the ouput.
If I try to do the following
out = coder.ceval(pidata_parse .....)
Matlab tells me to pre-initialsize the output. So I did the following:
out = struct{'a',0,'b',0 etc}
which works fine. Note: My Output will always be some kind of struct.
Evertime I change the Data thats coming in, I have to open up the System and change the strcut aswell as the definition of the nonvituell Bus. Is it somehow possible to create the struct depending on the entries of the Bus, so I only have to change the Bus setup ?.
Since I'm using the Support Package for Raspberry Pi I can't use the Simulink.Bus.createMATLABStruct command.
Thank you in advance Michael

Respuestas (0)

La pregunta está cerrada.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by