Info
La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.
Struct from nonvirtuell Bus
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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
0 comentarios
Respuestas (0)
La pregunta está cerrada.
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!