How do I export data from the embedded code?

조회 수: 5 (최근 30일)
Johan Svendsen
Johan Svendsen 2019년 8월 18일
답변: Roshni Garnayak 2019년 8월 21일
Hi everyone
I'm a building an MPC, to follow an optimal trajectory I have computed, for this I want to embed the code, using the simulink "build model" feature and eventually put it on an ETAS 910. But this is my first experience with this and I can't figure out what block can give me the control, state and reference signal as an output. The "To file" block gives me some data, but when you open the file its either corrupted or contains what I think is raw code.(I have tried export to both csv and xlsx)
Any help is much appreciated, as this is a new area for me! Thank you.
Kind regards
Johan Svendsen

답변 (1개)

Roshni Garnayak
Roshni Garnayak 2019년 8월 21일
Set the following parameters under ‘Model Configuration Parameters’ (gear button available in the toolbar):
  • Code Generation -> System target file -> ert.tlc
  • Code Generation -> Interface -> MAT-file logging (check the box)
For ‘To File’ block, code generation for only RSim targets is identical to Simulink. All other embedded code generation targets support only double, one-dimensional, real signals in array with time format.
Refer to the following link to know more about the code generation capabilities of ‘To File’ block:

카테고리

Help CenterFile Exchange에서 Simulink Coder에 대해 자세히 알아보기

제품


릴리스

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by