Asked by Joseph
on 23 Mar 2012

Hi all,I have a tank system in simulink and would like to save or convert it to a csv file.Does anyone know how this can be done?

*No products are associated with this question.*

Answer by Kaustubha Govind
on 23 Mar 2012

Accepted answer

A .csv file is typically a text-file with comma-separated numerical values - how can a Simulink model be represented simply in terms of numerical values? AFAIK, such a conversion is not possible.

Joseph
on 23 Mar 2012

Answer by Joseph
on 23 Mar 2012

Answer by K E
on 23 Mar 2012

Are you trying to pass the **output** of a Simulink model into LabView, such as a time series of simulated position and velocity? If so then you can use a To Workspace block in your Simulink model to pass the time series out of Simulink and into Matlab's workspace, then in Matlab you could save the variable to a CSV file using a Matlab utility such as csvwrite. Then you could read the resulting csv file into LabView. There are other ways to go from [Simulink time series] to [saved csv file]; this is one example.

K E
on 26 Mar 2012

http://www.mathworks.com/matlabcentral/answers/15982-how-to-store-output-data-from-a-simulink-model-to-a-text-file

Answer by Joseph
on 26 Mar 2012

Hi KE,thanks for you answer to my question about converting a simulink model into a csv file.What i really want to do is that,i have a tank model in simulink and the user interface of this tank model will be in Labview.Since i dont have the instrument control toolbox to communicate via TCP/IP i want a situation where i can write the input and output of the tank to a file,Labview will read from that file and display that on the user interface.Labview too will also write to a file and simulink will read from that file.Do you think this can be done?Thanks and hope you understand what i am trying to say.Dont want to go through Matlab

Kaustubha Govind
on 26 Mar 2012

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi test

Learn moreOpportunities for recent engineering grads.

Apply Today
## 0 Comments